Re: proposal: generic function, constructor function

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>
Cc: "Pgsql Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: proposal: generic function, constructor function
Date: 2008-01-18 20:59:59
Message-ID: 12663.1200689999@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com> writes:
> I propose two kinds of functions:

> a) generic functions - this function allows any params without any
> implicit casting (it can implemented only in C language).

Can't you do that already with ANYELEMENT, or at the worst ANY?

> It allows unspecified number of params
> without parser changes.

Why is that a good idea (and if you think it won't take parser changes,
you're wrong)?

> Limits: only one function with specified name can exists in schema.

This is why it's a bad idea. Please note that the unique index on
pg_proc cannot enforce that, even if we wanted such a restriction.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2008-01-18 21:34:45 Re: proposal: generic function, constructor function
Previous Message Tom Lane 2008-01-18 19:33:27 Recent pg_regress changes break testing under SELinux