Re: proposal: generic function, constructor function - Mailing list pgsql-hackers

From Tom Lane
Subject Re: proposal: generic function, constructor function
Date
Msg-id 12663.1200689999@sss.pgh.pa.us
Whole thread Raw
In response to proposal: generic function, constructor function  ("Pavel Stehule" <pavel.stehule@gmail.com>)
Responses Re: proposal: generic function, constructor function  ("Pavel Stehule" <pavel.stehule@gmail.com>)
List pgsql-hackers
"Pavel Stehule" <pavel.stehule@gmail.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


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Recent pg_regress changes break testing under SELinux
Next
From: "Pavel Stehule"
Date:
Subject: Re: proposal: generic function, constructor function