Re: missing support of named convention for procedures

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Subject: Re: missing support of named convention for procedures
Date: 2018-03-16 10:29:59
Message-ID: CAFj8pRCmXvOKpA6Wn7_k=YwdTn4gi2B5npSvU6x_fkzaPx7Sdw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2018-03-16 8:43 GMT+01:00 Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>:

>
>
> 2018-03-15 22:13 GMT+01:00 Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>:
>
>> Hi
>>
>> create or replace procedure proc2(in a int, in b int)
>> as $$
>> begin
>> a := a * 10;
>> b := b * 10;
>> end;
>> $$ language plpgsql;
>>
>> postgres=# call proc2(a => 10,b => 20);
>> ERROR: XX000: unrecognized node type: 107
>> LOCATION: ExecInitExprRec, execExpr.c:2114
>>
>
> Defaults are not supported too:
>
> postgres=# create or replace procedure foo1(a int, b int, c int default
> 10)
> as $$
> begin
> raise notice 'a: %, b: %, c: %', a, b, c;
> end;
> $$ language plpgsql;
> CREATE PROCEDURE
> postgres=# call foo1(10,20);
> NOTICE: 00000: a: 10, b: 20, c: -778600432
> LOCATION: exec_stmt_raise, pl_exec.c:3643
> CALL
>

attached patch fixes it

Regards

Pavel

>
>
>> Regards
>>
>> Pavel
>>
>
>

Attachment Content-Type Size
plpgsql-call-named-default-args.patch text/x-patch 8.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2018-03-16 10:31:41 Re: missing support of named convention for procedures
Previous Message Amit Kapila 2018-03-16 10:06:03 Re: [HACKERS] why not parallel seq scan for slow functions