pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stefano B. <stefano.bonnin@comai.to>
To: pgsql-jdbc@postgresql.org
Subject: 8.2 and  nonstandard use of \\ in prepared statements
Date: Fri, 15 Dec 2006 09:02:38 +0100
Message-ID: <03a101c7201f$6396a300$0501a8c0@comai04> (raw)

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

view thread (2+ messages)  latest in thread

Message-ID: <03a101c7201f$6396a300$0501a8c0@comai04>
Permalink:  ../03a101c7201f$6396a300$0501a8c0@comai04/
Also on:    postgresql.org/message-id/03a101c7201f$6396a300$0501a8c0@comai04

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: stefano.bonnin@comai.to
  Subject: Re: 8.2 and  nonstandard use of \\ in prepared statements
  In-Reply-To: <03a101c7201f$6396a300$0501a8c0@comai04>
  References: <03a101c7201f$6396a300$0501a8c0@comai04>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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