pg_get_serial_sequence is inconsistent

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pg_get_serial_sequence is inconsistent
Дата
Msg-id 28121.1098940366@sss.pgh.pa.us
обсуждение исходный текст
Ответы Re: pg_get_serial_sequence is inconsistent  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
Список pgsql-hackers
pg_get_serial_sequence() does dequoting/downcasing on its relation-name
argument, but not on its column-name argument.

regression=# create table "FOO" ("Ff1" serial);
NOTICE:  CREATE TABLE will create implicit sequence "FOO_Ff1_seq" for serial column "FOO.Ff1"
CREATE TABLE
regression=# select pg_get_serial_sequence('FOO','Ff1');
ERROR:  column "Ff1" of relation "foo" does not exist
regression=# select pg_get_serial_sequence('"FOO"','Ff1');pg_get_serial_sequence 
------------------------public."FOO_Ff1_seq"
(1 row)

regression=# select pg_get_serial_sequence('"FOO"','"Ff1"');
ERROR:  column ""Ff1"" of relation "FOO" does not exist
regression=# 

This seems pretty inconsistent.  I was expecting to find that it broke
pg_dump, as well, but it looks like pg_dump is expecting exactly
this behavior.

Should we change it?  We need the quote-aware behavior for the relation
name (because that could be schema-qualified) so the choices seem to be
status quo or add dequoting/downcasing to the column name argument.
        regards, tom lane


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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Shared dependencies
Следующее
От: Christopher Kings-Lynne
Дата:
Сообщение: Re: pg_get_serial_sequence is inconsistent