Re: Adding a pg_get_owned_sequence function?

Поиск
Список
Период
Сортировка
От Nathan Bossart
Тема Re: Adding a pg_get_owned_sequence function?
Дата
Msg-id 20231024162929.GA871220@nathanxps13
обсуждение исходный текст
Ответ на Re: Adding a pg_get_owned_sequence function?  (Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>)
Ответы Re: Adding a pg_get_owned_sequence function?  (vignesh C <vignesh21@gmail.com>)
Список pgsql-hackers
On Tue, Sep 12, 2023 at 03:53:28PM +0100, Dagfinn Ilmari Mannsåker wrote:
> Tom Lane <tgl@sss.pgh.pa.us> writes:
>> It's possible that we could get away with just summarily changing
>> the argument type from text to regclass.  ISTR that we did exactly
>> that with nextval() years ago, and didn't get too much push-back.
>> But we couldn't do the same for the return type.  Also, this
>> approach does nothing for the concern about the name being
>> misleading.
> 
> Maybe we should go all the way the other way, and call it
> pg_get_identity_sequence() and claim that "serial" is a legacy form of
> identity columns?

Hm.  Could we split it into two functions, pg_get_owned_sequence() and
pg_get_identity_sequence()?  I see that commit 3012061 [0] added support
for identity columns to pg_get_serial_sequence() because folks expected
that to work, so maybe that's a good reason to keep them together.  If we
do elect to keep them combined, I'd be okay with renaming it to
pg_get_identity_sequence() along with your other proposed changes.

[0] https://postgr.es/m/20170912212054.25640.55202%40wrigleys.postgresql.org

-- 
Nathan Bossart
Amazon Web Services: https://aws.amazon.com



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: trying again to get incremental backup
Следующее
От: Nathan Bossart
Дата:
Сообщение: Re: Add new for_each macros for iterating over a List that do not require ListCell pointer