pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: j.random.programmer <javadesigner@yahoo.com>
To: pgsql-jdbc@postgresql.org
Subject: 8.2dev-500.jdbc3 driver: PreparedStatement.toString() is buggy
Date: Mon, 19 Dec 2005 10:57:23 -0800 (PST)
Message-ID: <20051219185723.47640.qmail@web32010.mail.mud.yahoo.com> (raw)

Hi:

There seems to be a bug with the 8.2dev-500
driver, running against a postgres 8.1 database.

If I have a PreparedStatement, then when I say:

System.out.println(ps)

the the prepared statement that is printed is
*missing* single quotes around data/time AND
character/string values. This means that I 
cannot copy that preparedstatment and paste
it directly into a psql session etc.

For example, this is what a ps.toString() looks like:
--------------------------------------
 INSERT into alltypes (smallint_val, int_val,
bigint_val, float_val, double_val, numeric_val,
char_val, varchar_val, timestamp_val, bit_val,
varbinary_val) values (5, 6, 7000, 3.14, 3.141, 11.32,
foo2, bar2, 2005-12-19 09:55:23.464000 -0500, 1,
<stream of 5 bytes>)
-------------------------------------

Note, this is not valid sql since no quotes around
'foo2', 'bar2', '2005...' etc (which are
respectively char and date types).

This is definitely a regression, this did not happen
with earlier drivers. 

Best regards,

--j

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



view thread (4+ messages)  latest in thread

Message-ID: <20051219185723.47640.qmail@web32010.mail.mud.yahoo.com>
Permalink:  ../20051219185723.47640.qmail@web32010.mail.mud.yahoo.com/
Also on:    postgresql.org/message-id/20051219185723.47640.qmail@web32010.mail.mud.yahoo.com

 · 

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: javadesigner@yahoo.com
  Subject: Re: 8.2dev-500.jdbc3 driver: PreparedStatement.toString() is buggy
  In-Reply-To: <20051219185723.47640.qmail@web32010.mail.mud.yahoo.com>
  References: <20051219185723.47640.qmail@web32010.mail.mud.yahoo.com>

* 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