From: Kris Jurka <books@ejurka.com>
To: Ken Johanson <pg-user@kensystem.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Synthesize support for Statement.getGeneratedKeys()?
Date: Thu, 15 Feb 2007 20:08:26 -0700
Message-ID: <45D5202A.5020000@ejurka.com> (raw)
In-Reply-To: <45D3D9FA.4070509@kensystem.com>
References: <4580E681.3080106@kensystem.com>
<45B9A9D6.2080100@kensystem.com>
<Pine.BSO.4.64.0701262352340.20148@leary2.csoft.net>
<45BECBA1.8080508@kensystem.com>
<Pine.BSO.4.64.0702011325410.23261@leary2.csoft.net>
<45D24BF2.6010405@kensystem.com>
<Pine.BSO.4.64.0702141250550.3571@leary.csoft.net>
<45D3D9FA.4070509@kensystem.com>
Ken Johanson wrote:
> Do you know what built-in method I can choose to determine what
> identifiers need quoting?
>
There isn't one, but I was thinking about it some more and I think we
might want to quote everything. Otherwise we won't be able to
distinguish between columns that are created with quotes and those
without. Consider a table like:
CREATE TABLE tab(a int, "A" int);
Without parsing the query and doing some metadata lookups we won't know
what the columns are. I'd rather not try to do this and the behavior
matches our existing handling of DatabaseMetaData methods. Although we
might get some complaints, I'm OK with it.
Right now the only place we quote identifiers in
jdbc3/PSQLSavepoint#getPGName. I would suggest creating a method in
org.postgresql.core.Utils named appendEscapedIdentifier that works like
appendEscapedString and using it in both places.
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: books@ejurka.com, pg-user@kensystem.com
Subject: Re: Synthesize support for Statement.getGeneratedKeys()?
In-Reply-To: <45D5202A.5020000@ejurka.com>
References: <4580E681.3080106@kensystem.com> <45B9A9D6.2080100@kensystem.com> <Pine.BSO.4.64.0701262352340.20148@leary2.csoft.net> <45BECBA1.8080508@kensystem.com> <Pine.BSO.4.64.0702011325410.23261@leary2.csoft.net> <45D24BF2.6010405@kensystem.com> <Pine.BSO.4.64.0702141250550.3571@leary.csoft.net> <45D3D9FA.4070509@kensystem.com> <45D5202A.5020000@ejurka.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