[mapserver-users] Same database connection across multiple layers

Richard Greenwood richard.greenwood at gmail.com
Fri May 13 08:05:24 PDT 2022


Use INCLUDE 'pgconn.map'

With pgconn.map looking like:

CONNECTIONTYPE postgis
CONNECTION "user=USER password=PASSWORD dbname=DATABASE host=127.0.0.1
port=5432"
PROCESSING "CLOSE_CONNECTION=DEFER"


On Fri, May 13, 2022 at 7:14 AM Atlanta Geek <atlantageek at gmail.com> wrote:

> Is there a way to set the db connection only once for multiple layers.
> We have a very dynamic mapfile with lots of layers and its a pain to
> replace the db name when doing development or changing for a customer.  We
> are running ms4w as well.
>
>
> In addition to this is it possible to set the connection string outside
> the mapfile.  Maybe as an option to the cgi script or something.
>
> --
> http://www.atlantageek.com
> _______________________________________________
> MapServer-users mailing list
> MapServer-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>


-- 
Richard W. Greenwood
www.greenwoodmap.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20220513/eb1253f7/attachment.htm>


More information about the MapServer-users mailing list