Re: [INTERFACES] New code for JDBC driver

From: Barry Lind <barry(at)xythos(dot)com>
To: Arsalan Zaidi <azaidi(at)directi(dot)com>
Cc: PostgreSQL jdbc list <pgsql-jdbc(at)postgresql(dot)org>, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Subject: Re: [INTERFACES] New code for JDBC driver
Date: 2001-07-02 16:21:35
Message-ID: 3B409F8F.7050408@xythos.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces 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

In response to

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Peter Eisentraut 2001-07-02 17:56:52 Re: libpq++ on Windows
Previous Message Christian Ullrich 2001-07-02 14:57:02 Re: libpq++ on Windows

Browse pgsql-jdbc by date

  From Date Subject
Next Message Bruce Momjian 2001-07-02 16:21:49 Re: [INTERFACES] New code for JDBC driver
Previous Message Bruce Momjian 2001-07-02 16:20:40 Re: Patch to set timezone once instead of every call