On Sat, 6 Apr 2013 14:02:09 +0100 Mateusz Loskot <[email protected]> wrote:
ML> > the application gives my the following error:
ML> >
ML> > "Wt: fatal error: ERROR: syntax error at or near ""$1""
ML> > LINE 1: ...etsrid('BOX3D(15.0118 37.4667, 15.2118 37,6667)'::$1, 4326) ...
ML> >
ML> > the error is given in place of $1 that in the query is ::box3d. Why? there
ML> > was this traslation?
ML>
ML> I haven't tested your query in action, but I suppose there may be conflict
ML> between casting operators and how SOCI parses query to handle
ML> placeholders bound by name:
ML>
ML> http://soci.sourceforge.net/doc/3.2.0/exchange.html#bind_name
FWIW the code in PostgreSQL backend clearly tries to detect the cast
operators, there are even several cases for this there.
ML> > Maybe is the double colons that gives the problem? How
ML> > I can fix? How to pass a colon in the sql string?
ML>
ML> Can you try the alternative [1], SQL conformant, syntax for the cast:
ML>
ML> SetSRID(CAST('BOX3D(15.0118 37.4667, 15.2118 37,6667)' AS box3d), 4326)
From reading the code, it also looks like you should be able to use a
backslash to escape (each) colon. But I haven't tested this myself.
Regards,
VZ
pgp8TcBZ6qg7K.pgp
Description: PGP signature
------------------------------------------------------------------------------ Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html
_______________________________________________ soci-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/soci-users
