Re: Synthesize support for Statement.getGeneratedKeys()?

From: Kris Jurka <books(at)ejurka(dot)com>
To: Ken Johanson <pg-user(at)kensystem(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Synthesize support for Statement.getGeneratedKeys()?
Date: 2007-02-16 03:08:26
Message-ID: 45D5202A.5020000@ejurka.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

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.

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Kris Jurka 2007-02-16 03:34:25 Re: Synthesize support for Statement.getGeneratedKeys()?
Previous Message Ken Johanson 2007-02-15 23:40:26 Re: Synthesize support for Statement.getGeneratedKeys()?