Re: bugfix: BUG #15477: Procedure call with named inout refcursor parameter - "invalid input syntax for type boolean"

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: bugfix: BUG #15477: Procedure call with named inout refcursor parameter - "invalid input syntax for type boolean"
Date: 2018-11-05 17:51:45
Message-ID: CAFj8pRD_ZkgC_giUGwWHm5=Sag1xbmjuPNsPZEfJ4S_SpvT9JA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

po 5. 11. 2018 v 10:22 odesílatel Peter Eisentraut <
peter(dot)eisentraut(at)2ndquadrant(dot)com> napsal:

> On 04/11/2018 16:54, Tom Lane wrote:
> > I looked into SQL:2011 to see what it has to say about this. In
> > 10.4 <routine invocation>, syntax rule 9) g) iii) says
> >
> > For each SQL parameter Pi, 1 (one) ≤ i ≤ SRNP, that is an output SQL
> > parameter or both an input SQL parameter and an output SQL parameter,
> > XAi shall be a <target specification>.
> >
> > The immediately preceding rules make it clear that XAi is the actual
> > argument corresponding to parameter Pi *after* default-insertion and
> > named-argument reordering. So our existing behavior here clearly
> > contradicts the spec: DEFAULT is not a <target specification>.
>
> Note that parameter defaults with output parameters was only added in
> SQL:2016.
>

It can be disabled for PostgreSQL 11 like now - the only OUT variables we
doesn't support.

For PostgreSQL 12 we can enhance expand_function_arguments although I have
not any idea how.

I have not a idea, what is benefit of OUT variables with default value if
there are not necessary be assigned to target value.

The question? a) Default for OUT parameter means some predefined value, if
this parameter was not assigned inside function. Or b) it means so this OUT
value should not be assigned to target variable.

@a has sense, and I understand. @b is strange for me, and I don't
understand to use case now.

regards

Pavel

>
> --
> Peter Eisentraut http://www.2ndQuadrant.com/
> PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2018-11-05 18:14:29 Re: partitioned tables referenced by FKs
Previous Message Robert Haas 2018-11-05 17:48:20 Re: New vacuum option to do only freezing