Re: [INTERFACES] New code for JDBC driver - Mailing list pgsql-jdbc

From Barry Lind
Subject Re: [INTERFACES] New code for JDBC driver
Date
Msg-id 3B409F8F.7050408@xythos.com
Whole thread Raw
In response to Re: [INTERFACES] New code for JDBC driver  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: Re: [INTERFACES] New code for JDBC driver
List pgsql-jdbc
Arsalan,

Why do you consider semi colons outside of quotes to be an error condition?

It is legal under postgresql to execute multiple SQL statements under
one call to the server.  For example you can execute:

update foo set bar = ?; select * from foo;

In one call to the server by setting the 'query' on the Statement or
Prepared statement object to be the entire string above.

As you can see from this example it is certainly therefore legal to have
a semi-colon outside of quotes.

As to your second point about escapeSQL escaping quotes, I don't see
anywhere in the JDBC spec that says that type of behavior is supposed to
happen.  Do you have an example where you feel the behavior of the
escapeSQL method isn't conforming to the JDBC spec with regards to quote
handling?

thanks,
--Barry


pgsql-jdbc by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Patch for dead code in JDBC PG_Stream
Next
From: Peter Wiley
Date:
Subject: Re: Re: [INTERFACES] New code for JDBC driver