<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif; ">
<div>Comma separated table names is also part of the OCI connection</div>
<div><br>
</div>
<div><span style="color: rgb(0, 0, 0); font-family: Times; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); display: inline !important; float: none;">"OCI:userid/password@database_instance:table,table"</span></div>
<div><span style="color: rgb(0, 0, 0); font-family: Times; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); display: inline !important; float: none;"><br>
</span></div>
<div><span style="color: rgb(0, 0, 0); font-family: Times; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); display: inline !important; float: none;"><a href="http://www.gdal.org/ogr/drv_oci.html">http://www.gdal.org/ogr/drv_oci.html</a></span></div>
<div><br>
</div>
<span id="OLK_SRC_BODY_SECTION">
<div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span>Brent Fraser <<a href="mailto:bfraser@geoanalytic.com">bfraser@geoanalytic.com</a>><br>
<span style="font-weight:bold">Organization: </span>GeoAnalytic Inc.<br>
<span style="font-weight:bold">Date: </span>Monday, March 4, 2013 5:25 PM<br>
<span style="font-weight:bold">To: </span>Tamas Szekeres <<a href="mailto:szekerest@gmail.com">szekerest@gmail.com</a>><br>
<span style="font-weight:bold">Cc: </span>"<a href="mailto:mapserver-dev@lists.osgeo.org">mapserver-dev@lists.osgeo.org</a>" <<a href="mailto:mapserver-dev@lists.osgeo.org">mapserver-dev@lists.osgeo.org</a>><br>
<span style="font-weight:bold">Subject: </span>Re: [mapserver-dev] Layer names in OGR connection strings (undocumented feature causing problems)<br>
<span style="font-weight:bold">Resent-From: </span>Michael Smith <<a href="mailto:michael.smith@usace.army.mil">michael.smith@usace.army.mil</a>><br>
</div>
<div><br>
</div>
<div>
<div text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Tamas,<br>
<br>
  No doc that I know of.  I knew of the technique of adding comma-separated table names to connection strings from years ago when I was trying to improve the performance of an ODBC connection (<a class="moz-txt-link-freetext" href="http://www.gdal.org/ogr/drv_odbc.html">http://www.gdal.org/ogr/drv_odbc.html</a>). 
 Stating the table names relieves the driver from enumerating all the tables (and views etc) in the schema.  Maybe I had reviewed the source code; I can't recall...<br>
<pre class="moz-signature" cols="72">Best Regards,
Brent Fraser</pre>
On 3/4/2013 2:20 PM, Tamas Szekeres wrote:<br>
</div>
<blockquote cite="mid:CACALY+QG1SHAR+FLzHkzEaB=gavk05=y9Tvm7GYC8TfODOd+qw@mail.gmail.com" type="cite">
Brent,
<div><br>
</div>
<div>Could you point me to the documentation where this syntax is mentioned? Is this specific to OGR tile indexes?</div>
<div><br>
</div>
<div>Best regards,</div>
<div><br>
</div>
<div>Tamas</div>
<div><br>
</div>
<div><br>
<br>
<div class="gmail_quote">2013/3/3 Brent Fraser <span dir="ltr"><<a moz-do-not-send="true" href="mailto:bfraser@geoanalytic.com" target="_blank">bfraser@geoanalytic.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<div>Tamas,<br>
  if I understand correctly you are talking about connection strings like:<br>
<br>
        CONNECTIONTYPE OGR <br>
        TILEINEX "PG:dbname='PN2010_0911' host='thinkcentre1' port='5432' user='PN2010_0911' password='PN2010_0911',images"
<br>
<br>
note the comma and table name at the end.  <br>
See <a moz-do-not-send="true" href="http://lists.osgeo.org/pipermail/mapserver-dev/2011-April/011194.html" target="_blank">
http://lists.osgeo.org/pipermail/mapserver-dev/2011-April/011194.html</a><br>
<br>
<br>
<pre cols="72">Best Regards,
Brent Fraser</pre>
<div>
<div class="h5">On 3/3/2013 2:09 PM, Tamas Szekeres wrote:<br>
</div>
</div>
</div>
<blockquote type="cite">
<div>
<div class="h5">Hi,
<div><br>
</div>
<div>According to a commit (made 11 years ago) in <a moz-do-not-send="true" href="http://trac.osgeo.org/mapserver/changeset/1370" target="_blank">
rev1370</a>  the OGR connections strings are being split by the comma separators, see the following fragment in msOGRFileOpen:</div>
<div><br>
</div>
<div>
<div>     papszTokens = CSLTokenizeStringComplex( conn_decrypted, ",", TRUE, FALSE );</div>
<div><br>
</div>
<div>    if( CSLCount(papszTokens) > 0 )</div>
<div>      pszDSName = CPLStrdup( papszTokens[0] );</div>
<div>    if( CSLCount(papszTokens) > 1 )</div>
<div>      pszLayerDef = CPLStrdup( papszTokens[1] );</div>
</div>
<div><br>
</div>
<div>This behaviour causes issues if the syntax of the connection string may normally expect commas, like with the issue:
<a moz-do-not-send="true" href="http://trac.osgeo.org/gdal/ticket/4885" target="_blank">
http://trac.osgeo.org/gdal/ticket/4885</a></div>
<div><br>
</div>
<div><br>
</div>
<div>Does it make sense to split the connection strings this way? </div>
<div><br>
</div>
<div>According to the <a moz-do-not-send="true" href="http://mapserver.org/en/input/vector/ogr.html" target="_blank">
OGR driver documentation</a> the layer definitions should go to the DATA section and not to the CONNECTION section.</div>
<div><br>
</div>
<div>I'd be in favour of removing this fragment from the code but I'm not sure about all consequences.</div>
<div><br>
</div>
<div><br>
</div>
<div>Best regards,</div>
<div><br>
</div>
<div>Tamas</div>
<div><br>
</div>
<div><br>
</div>
<br>
<fieldset></fieldset> <br>
</div>
</div>
<pre>_______________________________________________
mapserver-dev mailing list
<a moz-do-not-send="true" href="mailto:mapserver-dev@lists.osgeo.org" target="_blank">mapserver-dev@lists.osgeo.org</a><a moz-do-not-send="true" href="http://lists.osgeo.org/mailman/listinfo/mapserver-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-dev</a></pre>
</blockquote>
<br>
</div>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</div>
</div>
</span>
</body>
</html>