From: | Peter Mount <petermount(at)maidstone(dot)gov(dot)uk> |
---|---|
To: | "'Grant Finnemore'" <gaf(at)ucs(dot)co(dot)za>, Peter Mount <petermount(at)maidstone(dot)gov(dot)uk> |
Cc: | Interfaces <pgsql-interfaces(at)postgresql(dot)org>, "'pgsql-hackers(at)postgresql(dot)org'" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | RE: [INTERFACES] JDBC 'Unterminated quoted string' |
Date: | 2000-11-10 10:27:32 |
Message-ID: | 1B3D5E532D18D311861A00600865478CF1B519@exchange1.nt.maidstone.gov.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-interfaces |
Yes it does look like it's the insert that's at fault. I've tested it on a
current backend here and it has the same problem.
Peter
--
Peter Mount
Enterprise Support Officer, Maidstone Borough Council
Email: petermount(at)maidstone(dot)gov(dot)uk
WWW: http://www.maidstone.gov.uk
All views expressed within this email are not the views of Maidstone Borough
Council
-----Original Message-----
From: Grant Finnemore [mailto:gaf(at)ucs(dot)co(dot)za]
Sent: Friday, November 10, 2000 10:21 AM
To: Peter Mount
Cc: Interfaces
Subject: Re: [INTERFACES] JDBC 'Unterminated quoted string'
Peter,
Joseph Shraibman contacted me yesterday about whether or not the patch that
I
sent actually does the correct thing. I enclose my response below.
In brief, there seems to be some problem at the backend inserting a \0. I
have
tested the query from the modified jdbc driver, psql and a standalone
backend.
Regards,
Grant
I tested by doing the following:-
In psql...
CREATE TABLE t ( aa char(1) );
INSERT INTO t VALUES ('\0');
In java test program...
PreparedStatement ps =
conn.prepareStatement("insert into t values (?)");
ps.setString(1, String.valueOf('\0'));
ps.executeUpdate();
In psql...
test=# select * from t;
aa
----
(2 rows)
test=# select ascii(aa) from t;
ascii
-------
32
32
(2 rows)
This is wierd! Both psql and the java app insert the same value and both are
not 0.
However,
test=# select ascii('\0');
ascii
-------
0
(1 row)
This appears correct, so the problem would appear to be in the insert.
--
> Poorly planned software requires a genius to write it
> and a hero to use it.
Grant Finnemore BSc(Eng) (mailto:gaf(at)ucs(dot)co(dot)za)
Software Engineer Universal Computer Services
Tel (+27)(11)712-1366 PO Box 31266 Braamfontein 2017, South Africa
Cell (+27)(82)604-5536 20th Floor, 209 Smit St., Braamfontein
Fax (+27)(11)339-3421 Johannesburg, South Africa
From | Date | Subject | |
---|---|---|---|
Next Message | devik | 2000-11-10 10:40:09 | Re: Query caching |
Previous Message | Zeugswetter Andreas SB | 2000-11-10 08:39:54 | AW: Results of testing WAL |
From | Date | Subject | |
---|---|---|---|
Next Message | Christof Petig | 2000-11-10 10:52:48 | Re: Re: [INTERFACES] USE OF CURSORS IN ECPG |
Previous Message | Grant Finnemore | 2000-11-10 10:21:17 | Re: JDBC 'Unterminated quoted string' |