From: | Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Dunstan <andrew(at)dunslane(dot)net> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: CALL versus procedures with output-only arguments |
Date: | 2021-06-03 21:41:38 |
Message-ID: | f0d75340-488d-19ae-ddab-31218cecad20@enterprisedb.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 03.06.21 22:21, Tom Lane wrote:
> Once you do, you'll possibly notice that PG's rules for which combinations
> of signatures are allowed are different from the spec's. I believe that
> we're largely more generous than the spec, but there are a few cases where
> this proposal isn't. An example is that (AFAICT) the spec allows having
> both
> create procedure divide(x int, y int, OUT q int) ...
> create procedure divide(x int, y int, OUT q int, OUT r int) ...
> which I want to reject because they have the same input parameters.
> This is perhaps annoying. But seeing that the spec won't allow you to
> also have divide() procedures for other datatypes, I'm having a hard
> time feeling that this is losing on the overloading-flexibility front.
I'm okay with disallowing this. In my experience, overloading of
procedures is done even more rarely than of functions, so this probably
won't affect anything in practice.
(I'm by no means suggesting this, but I could imagine a catalog
representation that allows this but still checks that you can't have
multiple candidates that differ only by the type of an OUT parameters.
Say with some kind of bitmap or boolean array that indicates where the
OUT parameters are. Then you can only have one candidate with a given
number of arguments, but the above could be allowed. Again, I'm not
suggesting this, but it's a possibility in theory.)
From | Date | Subject | |
---|---|---|---|
Next Message | David G. Johnston | 2021-06-03 21:47:55 | Re: DELETE CASCADE |
Previous Message | Jeff Davis | 2021-06-03 21:36:15 | Re: alter table set TABLE ACCESS METHOD |