Re: CALL versus procedures with output-only arguments

From: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
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:13:37
Message-ID: fb384834-0ed4-f217-212d-9e24c21ef882@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 02.06.21 02:04, Tom Lane wrote:
> I wrote:
>> It's possible that we could revert proargtypes and still accommodate
>> the spec's definition for ALTER/DROP ROUTINE/PROCEDURE. I'm imagining
>> some rules along the line of:
>> 1. If arg list contains any parameter modes, then it must be PG
>> syntax, so interpret it according to our traditional rules.
>> 2. Otherwise, try to match the given arg types against *both*
>> proargtypes and proallargtypes. If we get multiple matches,
>> complain that the command is ambiguous. (In the case of DROP
>> PROCEDURE, it's probably OK to consider only proallargtypes.)
>
> Hmm, actually we could make step 2 a shade tighter: if a candidate
> routine is a function, match against proargtypes. If it's a procedure,
> match against coalesce(proallargtypes, proargtypes). If we find
> multiple matches, raise ambiguity error.
>
> The cases where you get the error could be resolved by either
> using traditional PG syntax, or (in most cases) by saying
> FUNCTION or PROCEDURE instead of ROUTINE.

I'm ok with this proposal.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Gustafsson 2021-06-03 21:13:50 Re: Support for NSS as a libpq TLS backend
Previous Message Tom Lane 2021-06-03 21:11:41 Re: Support for NSS as a libpq TLS backend