public inbox for [email protected]  
help / color / mirror / Atom feed
From: Tom Lane <[email protected]>
To: Peter Eisentraut <[email protected]>
Cc: Nathan Bossart <[email protected]>
Cc: Dagfinn Ilmari MannsÃ¥ker <[email protected]>
Cc: vignesh C <[email protected]>
Cc: [email protected]
Subject: Re: Adding a pg_get_owned_sequence function?
Date: Tue, 09 Jan 2024 12:03:06 -0500
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<20231024162929.GA871220@nathanxps13>
	<CALDaNm0_nn-LXSJCXQ6EYiGKjVO8fVO8AemgEVZFQPPdx0=fkg@mail.gmail.com>
	<[email protected]>
	<20240108210847.GA2796792@nathanxps13>
	<[email protected]>

Peter Eisentraut <[email protected]> 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






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