unknown
1970-01-01 00:00:00 UTC
--f46d04339f0248b9fc04d9b33b27
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
<div dir="ltr"><div><div><div><div>I tried with the escape beckslash \ (that is \:\:box3d) but the error was the same.<br></div>Then I tried to change the cast syntax as suggested by Mateusz and the query worked.<br></div>
Could be a good idea to add an escape strategy like that one of the backslash (\) for parsing the colons. <br>Do I add the feature request on github?<br><br></div>thanks for the replies, <br></div>Bruno<br></div><div class="gmail_extra"> <br><br><div class="gmail_quote">2013/4/6 Vadim Zeitlin <span dir="ltr"><<a href="mailto:vz-***@zeitlins.org" target="_blank">vz-***@zeitlins.org</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Sat, 6 Apr 2013 14:02:09 +0100 Mateusz Loskot <<a href="mailto:***@loskot.net">***@loskot.net</a>> wrote:<br>
<br>
ML> > the application gives my the following error:<br>
ML> ><br>
ML> > "Wt: fatal error: ERROR: syntax error at or near ""$1""<br>
ML> > LINE 1: ...etsrid('BOX3D(15.0118 37.4667, 15.2118 37,6667)'::$1, 4326) ...<br>
ML> ><br>
ML> > the error is given in place of $1 that in the query is ::box3d. Why? there<br>
ML> > was this traslation?<br>
ML><br>
ML> I haven't tested your query in action, but I suppose there may be conflict<br>
ML> between casting operators and how SOCI parses query to handle<br>
ML> placeholders bound by name:<br>
ML><br>
ML> <a href="http://soci.sourceforge.net/doc/3.2.0/exchange.html#bind_name" target="_blank">http://soci.sourceforge.net/doc/3.2.0/exchange.html#bind_name</a><br>
<br>
FWIW the code in PostgreSQL backend clearly tries to detect the cast<br>
operators, there are even several cases for this there.<br>
<br>
ML> > Maybe is the double colons that gives the problem? How<br>
ML> > I can fix? How to pass a colon in the sql string?<br>
ML><br>
ML> Can you try the alternative [1], SQL conformant, syntax for the cast:<br>
ML><br>
ML> SetSRID(CAST('BOX3D(15.0118 37.4667, 15.2118 37,6667)' AS box3d), 4326)<br>
<br>
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
<div dir="ltr"><div><div><div><div>I tried with the escape beckslash \ (that is \:\:box3d) but the error was the same.<br></div>Then I tried to change the cast syntax as suggested by Mateusz and the query worked.<br></div>
Could be a good idea to add an escape strategy like that one of the backslash (\) for parsing the colons. <br>Do I add the feature request on github?<br><br></div>thanks for the replies, <br></div>Bruno<br></div><div class="gmail_extra"> <br><br><div class="gmail_quote">2013/4/6 Vadim Zeitlin <span dir="ltr"><<a href="mailto:vz-***@zeitlins.org" target="_blank">vz-***@zeitlins.org</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Sat, 6 Apr 2013 14:02:09 +0100 Mateusz Loskot <<a href="mailto:***@loskot.net">***@loskot.net</a>> wrote:<br>
<br>
ML> > the application gives my the following error:<br>
ML> ><br>
ML> > "Wt: fatal error: ERROR: syntax error at or near ""$1""<br>
ML> > LINE 1: ...etsrid('BOX3D(15.0118 37.4667, 15.2118 37,6667)'::$1, 4326) ...<br>
ML> ><br>
ML> > the error is given in place of $1 that in the query is ::box3d. Why? there<br>
ML> > was this traslation?<br>
ML><br>
ML> I haven't tested your query in action, but I suppose there may be conflict<br>
ML> between casting operators and how SOCI parses query to handle<br>
ML> placeholders bound by name:<br>
ML><br>
ML> <a href="http://soci.sourceforge.net/doc/3.2.0/exchange.html#bind_name" target="_blank">http://soci.sourceforge.net/doc/3.2.0/exchange.html#bind_name</a><br>
<br>
FWIW the code in PostgreSQL backend clearly tries to detect the cast<br>
operators, there are even several cases for this there.<br>
<br>
ML> > Maybe is the double colons that gives the problem? How<br>
ML> > I can fix? How to pass a colon in the sql string?<br>
ML><br>
ML> Can you try the alternative [1], SQL conformant, syntax for the cast:<br>
ML><br>
ML> SetSRID(CAST('BOX3D(15.0118 37.4667, 15.2118 37,6667)' AS box3d), 4326)<br>
<br>