From: | "j(dot)random(dot)programmer" <javadesigner(at)yahoo(dot)com> |
---|---|
To: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | 8.2dev-500.jdbc3 driver: PreparedStatement.toString() is buggy |
Date: | 2005-12-19 18:57:23 |
Message-ID: | 20051219185723.47640.qmail@web32010.mail.mud.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
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
From | Date | Subject | |
---|---|---|---|
Next Message | j.random.programmer | 2005-12-19 20:14:51 | Bug: Driver(8.2dev-500.jdbc3) does not handle boolean->BIT correctly |
Previous Message | Markus Schaber | 2005-12-17 13:23:19 | Re: Create Database using JDBC |