Re: Adding a pg_get_owned_sequence function? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Adding a pg_get_owned_sequence function?
Date
Msg-id 2196399.1704819786@sss.pgh.pa.us
Whole thread Raw
In response to Re: Adding a pg_get_owned_sequence function?  (Peter Eisentraut <peter@eisentraut.org>)
Responses Re: Adding a pg_get_owned_sequence function?
List pgsql-hackers
Peter Eisentraut <peter@eisentraut.org> writes:
> Would it work to change the signature of pg_get_serial_sequence to
>      pg_get_serial_sequence(table anyelement, column text) -> anyelement
> and then check inside the function code whether text or regclass was passed?

Probably not very well, because then we'd get no automatic coercion of
inputs that were not either type.

Maybe it would work to have both

pg_get_serial_sequence(table text, column text) -> text
pg_get_serial_sequence(table regclass, column text) -> regclass

but I wonder if that would create any situations where the parser
couldn't choose between these candidates.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Michail Nikolaev
Date:
Subject: Re: Revisiting {CREATE INDEX, REINDEX} CONCURRENTLY improvements
Next
From: Nathan Bossart
Date:
Subject: Re: verify predefined LWLocks have entries in wait_event_names.txt