Re: variadic function support - Mailing list pgsql-patches

From Tom Lane
Subject Re: variadic function support
Date
Msg-id 5827.1214269157@sss.pgh.pa.us
Whole thread Raw
In response to Re: variadic function support  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: variadic function support  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-patches
Andrew Dunstan <andrew@dunslane.net> writes:
> Tom Lane wrote:
>> What would you consider "proper and full support"?
>
> I don't know. But this doesn't feel like it.

That's a fairly weak argument for rejecting a patch that provides a
feature many people have asked for.

I thought the patch was pretty clever, actually.  The main functionality
complaint someone might level against it is that all the variadic
arguments have to be (coercible to) the same type.  However, that's
still pretty useful, and I don't see a reasonable solution that provides
more generality than that in a type-safe way.  I'm quite happy that you
can't write sprintf() using this ;-)

A different line of argument is whether this functionality is
sufficiently badly needed that we should get out in front of the SQL
standard on providing it, and risk being stuck with legacy behavior
if they eventually adopt some other mechanism to solve the same problem.
I'm not sure how worried I am about that.  There are certainly a
boatload of Postgres-isms in and around CREATE FUNCTION already,
so it's hard to make a case against "just one more".

            regards, tom lane

pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Patch for Prevent pg_dump/pg_restore from being affected by statement_timeout
Next
From: Andrew Dunstan
Date:
Subject: Re: variadic function support