public inbox for [email protected]
help / color / mirror / Atom feedFrom: Tom Lane <[email protected]>
To: Peter Eisentraut <[email protected]>
Cc: Dagfinn Ilmari Mannsåker <[email protected]>
Cc: [email protected]
Subject: Re: Adding a pg_get_owned_sequence function?
Date: Tue, 12 Sep 2023 10:40:22 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<[email protected]>
Peter Eisentraut <[email protected]> writes:
> Would it work to just overload pg_get_serial_sequence with regclass
> argument types?
Probably not; the parser would have no principled way to resolve
pg_get_serial_sequence('foo', 'bar') as one or the other. I'm
not sure offhand if it would throw error or just choose one, but
if it just chooses one it'd likely be the text variant.
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.
regards, tom lane
view thread (3+ messages)
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]
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