pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
8.2 and  nonstandard use of \\ in prepared statements
2+ messages / 2 participants
[nested] [flat]

* 8.2 and  nonstandard use of \\ in prepared statements
@ 2006-12-15 08:02  Stefano B. <stefano.bonnin@comai.to>
  0 siblings, 1 reply; 2+ messages in thread

From: Stefano B. @ 2006-12-15 08:02 UTC (permalink / raw)
  To: pgsql-jdbc

Hi,

I have installed postgresql 8.2 and I get some warning messages about use of backslashes in my queries.

I have a query like:

insert into mytable (f1,f2,f3) values (?,?,?)

where f3 is a binary stream

when the query is executed the server returns a warning about the use of backslashes in the query:

postgresWARNING:  nonstandard use of \\ in a string literal at character 96
2006-12-15 08:17:17 CET [local] dms postgresHINT:  Use the escape string syntax for backslashes, e.g., E'\\'.
2006-12-15 08:17:17 CET [local] dms postgresLOG:  statement: insert into synch_list (s_name,s_client,s_data) values ('20061215083000_cast,'casteggio','PK\\003\\004\\024\\000\\010\\000\\010\\000\\315C\\2175\\000\\000\\000\\...................')

I have tryed to use the new escape sintax:

insert into mytable (f1,f2,f3) values (?,?,(E?))

but it seems that the jdbc driver doesn't care about my new query and sends the query without the new escape syntax.

Is it possible to escape binary streams with the new escape sintax?
Thanks in advance.
Stefano

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: 8.2 and  nonstandard use of \\ in prepared statements
@ 2006-12-15 22:46  Kris Jurka <books@ejurka.com>
  parent: Stefano B. <stefano.bonnin@comai.to>
  0 siblings, 0 replies; 2+ messages in thread

From: Kris Jurka @ 2006-12-15 22:46 UTC (permalink / raw)
  To: Stefano B. <stefano.bonnin@comai.to>; +Cc: pgsql-jdbc



On Fri, 15 Dec 2006, Stefano B. wrote:

> I have installed postgresql 8.2 and I get some warning messages about 
> use of backslashes in my queries.
>

You are probably using an older JDBC driver.  To avoid this warning you 
must be using at least 8.2-504.

Kris Jurka




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2006-12-15 22:46 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-12-15 08:02 8.2 and  nonstandard use of \\ in prepared statements Stefano B. <stefano.bonnin@comai.to>
2006-12-15 22:46 ` Kris Jurka <books@ejurka.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox