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?