Re: Adding a pg_get_owned_sequence function?

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Adding a pg_get_owned_sequence function?
Date: 2023-09-12 07:33:54
Message-ID: 4970adf1-cdb0-9ae5-d405-e9c3395d9931@eisentraut.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 09.06.23 21:19, Dagfinn Ilmari Mannsåker wrote:
> I've always been annoyed by the fact that pg_get_serial_sequence takes
> the table and returns the sequence as strings rather than regclass. And
> since identity columns were added, the name is misleading as well (which
> is even acknowledged in the docs, together with a suggestion for a
> better name).

If you are striving for less misleading terminology, note that the
concept of an "owned sequence" does not exist for users of identity
sequences, and ALTER SEQUENCE / OWNED BY cannot be used for such sequences.

Would it work to just overload pg_get_serial_sequence with regclass
argument types?

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2023-09-12 07:46:31 Re: proposal: psql: show current user in prompt
Previous Message 쿼리트릭스 2023-09-12 07:27:18 Re: [ psql - review request ] review request for \d+ tablename, \d+ indexname indenting