Good point about quoting the connection string. That seems to work it around. Thanks.<div><br></div><div>Best regards,</div><div><br></div><div>Tamas</div><div><br><br><div class="gmail_quote">2013/3/5 Daniel Morissette <span dir="ltr"><<a href="mailto:dmorissette@mapgears.com" target="_blank">dmorissette@mapgears.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Note that since the parsing code uses CSLTokenizeStringComplex(), in the case of OCI connections (below) and the example from <a href="http://trac.osgeo.org/gdal/ticket/4885" target="_blank">http://trac.osgeo.org/gdal/<u></u>ticket/4885</a> one could likely work around the issue by enclosing the first part of the connection string inside quotes, e.g.<br>

<br>
CONNECTION '"OCI:userid/password@<u></u>database_instance:table,table"<u></u>,ogr_layer_id'<br>
<br>
I realize that dealing with string escaping this way is nasty and may not work for all cases.<br>
<br>
I am not sure about the impact of removing support for this way to specify the ogr layer id which I knew about as well without knowing whether it was documented or not. It's really hard to tell how many users have come to rely on it over time and I'd hate to break backwards compatibility if we can avoid it.<br>

<br>
Daniel<div class="im"><br>
<br>
<br>
On 13-03-04 5:29 PM, Smith, Michael ERDC-CRREL-NH wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
Comma separated table names is also part of the OCI connection<br>
<br>
"OCI:userid/password@database_<u></u>instance:table,table"<br>
<br>
<a href="http://www.gdal.org/ogr/drv_oci.html" target="_blank">http://www.gdal.org/ogr/drv_<u></u>oci.html</a><br>
<br>
From: Brent Fraser <<a href="mailto:bfraser@geoanalytic.com" target="_blank">bfraser@geoanalytic.com</a><br></div>
<mailto:<a href="mailto:bfraser@geoanalytic.com" target="_blank">bfraser@geoanalytic.<u></u>com</a>>><div class="im"><br>
Organization: GeoAnalytic Inc.<br>
Date: Monday, March 4, 2013 5:25 PM<br></div>
To: Tamas Szekeres <<a href="mailto:szekerest@gmail.com" target="_blank">szekerest@gmail.com</a> <mailto:<a href="mailto:szekerest@gmail.com" target="_blank">szekerest@gmail.com</a>>><br>
Cc: "<a href="mailto:mapserver-dev@lists.osgeo.org" target="_blank">mapserver-dev@lists.osgeo.org</a><br>
<mailto:<a href="mailto:mapserver-dev@lists.osgeo.org" target="_blank">mapserver-dev@lists.<u></u>osgeo.org</a>>" <<a href="mailto:mapserver-dev@lists.osgeo.org" target="_blank">mapserver-dev@lists.osgeo.org</a><br>

<mailto:<a href="mailto:mapserver-dev@lists.osgeo.org" target="_blank">mapserver-dev@lists.<u></u>osgeo.org</a>>><div class="im"><br>
Subject: Re: [mapserver-dev] Layer names in OGR connection strings<br>
(undocumented feature causing problems)<br>
Resent-From: Michael Smith <<a href="mailto:michael.smith@usace.army.mil" target="_blank">michael.smith@usace.army.mil</a><br></div>
<mailto:<a href="mailto:michael.smith@usace.army.mil" target="_blank">michael.smith@usace.<u></u>army.mil</a>>><div class="im"><br>
<br>
Tamas,<br>
<br>
   No doc that I know of.  I knew of the technique of adding<br>
comma-separated table names to connection strings from years ago when I<br>
was trying to improve the performance of an ODBC connection<br>
(<a href="http://www.gdal.org/ogr/drv_odbc.html" target="_blank">http://www.gdal.org/ogr/drv_<u></u>odbc.html</a>). Stating the table names<br>
relieves the driver from enumerating all the tables (and views etc) in<br>
the schema.  Maybe I had reviewed the source code; I can't recall...<br>
<br>
Best Regards,<br>
Brent Fraser<br>
<br>
On 3/4/2013 2:20 PM, Tamas Szekeres wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
Brent,<br>
<br>
Could you point me to the documentation where this syntax is<br>
mentioned? Is this specific to OGR tile indexes?<br>
<br>
Best regards,<br>
<br>
Tamas<br>
<br>
<br>
<br>
2013/3/3 Brent Fraser <<a href="mailto:bfraser@geoanalytic.com" target="_blank">bfraser@geoanalytic.com</a><br></div>
<mailto:<a href="mailto:bfraser@geoanalytic.com" target="_blank">bfraser@geoanalytic.<u></u>com</a>>><div class="im"><br>
<br>
    Tamas,<br>
      if I understand correctly you are talking about connection<br>
    strings like:<br>
<br>
            CONNECTIONTYPE OGR<br>
            TILEINEX "PG:dbname='PN2010_0911' host='thinkcentre1'<br>
    port='5432' user='PN2010_0911' password='PN2010_0911',images"<br>
<br>
    note the comma and table name at the end.<br>
    See<br>
    <a href="http://lists.osgeo.org/pipermail/mapserver-dev/2011-April/011194.html" target="_blank">http://lists.osgeo.org/<u></u>pipermail/mapserver-dev/2011-<u></u>April/011194.html</a><br>
<br>
<br>
    Best Regards,<br>
    Brent Fraser<br>
<br>
    On 3/3/2013 2:09 PM, Tamas Szekeres wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
    Hi,<br>
<br>
    According to a commit (made 11 years ago) in rev1370<br></div>
    <<a href="http://trac.osgeo.org/mapserver/changeset/1370" target="_blank">http://trac.osgeo.org/<u></u>mapserver/changeset/1370</a>>  the OGR<div class="im"><br>
    connections strings are being split by the comma separators, see<br>
    the following fragment in msOGRFileOpen:<br>
<br>
         papszTokens = CSLTokenizeStringComplex( conn_decrypted, ",",<br>
    TRUE, FALSE );<br>
<br>
        if( CSLCount(papszTokens) > 0 )<br>
          pszDSName = CPLStrdup( papszTokens[0] );<br>
        if( CSLCount(papszTokens) > 1 )<br>
          pszLayerDef = CPLStrdup( papszTokens[1] );<br>
<br>
    This behaviour causes issues if the syntax of the connection<br>
    string may normally expect commas, like with the issue:<br>
    <a href="http://trac.osgeo.org/gdal/ticket/4885" target="_blank">http://trac.osgeo.org/gdal/<u></u>ticket/4885</a><br>
<br>
<br>
    Does it make sense to split the connection strings this way?<br>
<br>
    According to the OGR driver documentation<br></div>
    <<a href="http://mapserver.org/en/input/vector/ogr.html" target="_blank">http://mapserver.org/en/<u></u>input/vector/ogr.html</a>> the layer<div class="im"><br>
    definitions should go to the DATA section and not to the<br>
    CONNECTION section.<br>
<br>
    I'd be in favour of removing this fragment from the code but I'm<br>
    not sure about all consequences.<br>
<br>
<br>
    Best regards,<br>
<br>
    Tamas<br>
<br>
<br>
<br>
<br>
    ______________________________<u></u>_________________<br>
    mapserver-dev mailing list<br></div>
    <a href="mailto:mapserver-dev@lists.osgeo.org" target="_blank">mapserver-dev@lists.osgeo.org</a>  <mailto:<a href="mailto:mapserver-dev@lists.osgeo.org" target="_blank">mapserver-dev@lists.<u></u>osgeo.org</a>><a href="http://lists.osgeo.org/mailman/listinfo/mapserver-dev" target="_blank">http://lists.osgeo.<u></u>org/mailman/listinfo/<u></u>mapserver-dev</a><br>

</blockquote>
<br>
<br>
</blockquote><div class="im">
<br>
<br>
<br>
______________________________<u></u>_________________<br>
mapserver-dev mailing list<br>
<a href="mailto:mapserver-dev@lists.osgeo.org" target="_blank">mapserver-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/mapserver-dev" target="_blank">http://lists.osgeo.org/<u></u>mailman/listinfo/mapserver-dev</a><br>
<br>
</div></blockquote><span class="HOEnZb"><font color="#888888">
<br>
<br>
-- <br>
Daniel Morissette<br>
<a href="http://www.mapgears.com/" target="_blank">http://www.mapgears.com/</a><br>
Provider of Professional MapServer Support since 2000</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
______________________________<u></u>_________________<br>
mapserver-dev mailing list<br>
<a href="mailto:mapserver-dev@lists.osgeo.org" target="_blank">mapserver-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/mapserver-dev" target="_blank">http://lists.osgeo.org/<u></u>mailman/listinfo/mapserver-dev</a><br>
</div></div></blockquote></div><br></div>