| From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> | 
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> | 
| Cc: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, 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-04 03:44:46 | 
| Message-ID: | CAFj8pRDUL=nC62L-AKKFDEo1en1ZT1otLfPdXkCjm8MHxif8PA@mail.gmail.com | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers | 
Hi
so 3. 11. 2018 v 22:47 odesílatel Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> napsal:
> I wrote:
> > I'm going to go see about converting this to just call
> > expand_function_arguments and then drop all the special-case code.
>
> So while looking at that ... isn't the behavior for non-writable output
> parameters basically insane?  It certainly fails to accord with the
> plpgsql documentation, which shows an example that would throw an error:
>
>         CREATE PROCEDURE triple(INOUT x int)
>         ...
>         CALL triple(5);
>
> It's even weirder that you can get away with not supplying a writable
> target value for an output argument so long as it has a default.
>
> I think the behavior here ought to be "if the actual argument is a plpgsql
> variable, assign the output back to it, otherwise do nothing".  That's
> much closer to the behavior of OUT arguments in other old-school
> programming languages.
>
I don't agree. The constant can be used only for IN parameter. Safe
languages like Ada does copy result to variable used as INOUT parameter.
PL/SQL doesn't allow it too.
The implemented limit can be good detection of passing parameters in bad
order.
Regards
Pavel
>
>                         regards, tom lane
>
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andrey Lepikhov | 2018-11-04 03:52:35 | Re: Making all nbtree entries unique by having heap TIDs participate in comparisons | 
| Previous Message | Steve Singer | 2018-11-04 03:24:09 | Re: settings to control SSL/TLS protocol version |