Re: Synthesize support for Statement.getGeneratedKeys()?

Поиск
Список
Период
Сортировка
От Kris Jurka
Тема Re: Synthesize support for Statement.getGeneratedKeys()?
Дата
Msg-id 45D5202A.5020000@ejurka.com
обсуждение исходный текст
Ответ на Synthesize support for Statement.getGeneratedKeys()?  (Ken Johanson <pg-user@kensystem.com>)
Ответы Re: Synthesize support for Statement.getGeneratedKeys()?  (Ken Johanson <pg-user@kensystem.com>)
Список 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.




В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Ken Johanson
Дата:
Сообщение: Re: Synthesize support for Statement.getGeneratedKeys()?
Следующее
От: Kris Jurka
Дата:
Сообщение: Re: Synthesize support for Statement.getGeneratedKeys()?