On 6 April 2013 14:31, Vadim Zeitlin <[email protected]> wrote: > 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.
Yes, and we also have test for this PostgreSQL-style typecast: https://github.com/SOCI/soci/blob/7941919fa632e525e127fde753cf9a0cb64545d3/src/backends/postgresql/test/test-postgresql.cpp#L427-L440 But, Bruno's query is more complex than what is tested, so our parsing may be not reliable enough. Best regards, -- Mateusz Loskot, http://mateusz.loskot.net ------------------------------------------------------------------------------ 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
