[mapserver-dev] Layer names in OGR connection strings (undocumented feature causing problems)
Brent Fraser
bfraser at geoanalytic.com
Sun Mar 3 13:41:23 PST 2013
Tamas,
if I understand correctly you are talking about connection strings like:
CONNECTIONTYPE OGR
TILEINEX "PG:dbname='PN2010_0911' host='thinkcentre1'
port='5432' user='PN2010_0911' password='PN2010_0911',images"
note the comma and table name at the end.
See http://lists.osgeo.org/pipermail/mapserver-dev/2011-April/011194.html
Best Regards,
Brent Fraser
On 3/3/2013 2:09 PM, Tamas Szekeres wrote:
> Hi,
>
> According to a commit (made 11 years ago) in rev1370
> <http://trac.osgeo.org/mapserver/changeset/1370> the OGR connections
> strings are being split by the comma separators, see the following
> fragment in msOGRFileOpen:
>
> papszTokens = CSLTokenizeStringComplex( conn_decrypted, ",",
> TRUE, FALSE );
>
> if( CSLCount(papszTokens) > 0 )
> pszDSName = CPLStrdup( papszTokens[0] );
> if( CSLCount(papszTokens) > 1 )
> pszLayerDef = CPLStrdup( papszTokens[1] );
>
> This behaviour causes issues if the syntax of the connection string
> may normally expect commas, like with the issue:
> http://trac.osgeo.org/gdal/ticket/4885
>
>
> Does it make sense to split the connection strings this way?
>
> According to the OGR driver documentation
> <http://mapserver.org/en/input/vector/ogr.html> the layer definitions
> should go to the DATA section and not to the CONNECTION section.
>
> I'd be in favour of removing this fragment from the code but I'm not
> sure about all consequences.
>
>
> Best regards,
>
> Tamas
>
>
>
>
> _______________________________________________
> mapserver-dev mailing list
> mapserver-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-dev/attachments/20130303/0ab2e907/attachment.html>
More information about the mapserver-dev
mailing list