public inbox for [email protected]
help / color / mirror / Atom feedFrom: Peter Eisentraut <[email protected]>
To: Nathan Bossart <[email protected]>
To: Dagfinn Ilmari Mannsåker <[email protected]>
Cc: vignesh C <[email protected]>
Cc: Tom Lane <[email protected]>
Cc: [email protected]
Subject: Re: Adding a pg_get_owned_sequence function?
Date: Tue, 9 Jan 2024 17:41:14 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <20240108210847.GA2796792@nathanxps13>
References: <[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<20231024162929.GA871220@nathanxps13>
<CALDaNm0_nn-LXSJCXQ6EYiGKjVO8fVO8AemgEVZFQPPdx0=fkg@mail.gmail.com>
<[email protected]>
<20240108210847.GA2796792@nathanxps13>
On 08.01.24 22:08, Nathan Bossart wrote:
> I think these are reasonable concerns, but with this patch, we now have the
> following functions:
>
> pg_get_identity_sequence(table regclass, column name) -> regclass
> pg_get_serial_sequence(table text, column text) -> text
>
> If we only look at the names, it sure sounds like the first one only works
> for identity columns, and the second only works for serial columns. But
> both work for identity_and_ serial. The real differences between the two
> are the parameter and return types. Granted, this is described in the
> documentation updates, but IMHO this is a kind-of bizarre state to end up
> in.
Yeah, that's really weird.
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?
view thread (8+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: Adding a pg_get_owned_sequence function?
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox