Re: pl/pgsql feature request: shorthand for argument and local variable references - Mailing list pgsql-hackers

From Vik Fearing
Subject Re: pl/pgsql feature request: shorthand for argument and local variable references
Date
Msg-id 5d0d09a2-d7e0-a00f-8bdb-ee12fc02e902@postgresfriends.org
Whole thread Raw
In response to Re: pl/pgsql feature request: shorthand for argument and local variable references  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: pl/pgsql feature request: shorthand for argument and local variable references  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-hackers
On 11/18/20 9:21 PM, Pavel Stehule wrote:
> postgres=# create or replace function bubu(a int, b int)
> returns void as $$
> #routine_label b
> begin
>   raise notice '% %', b.a, b.b;
> end;
> $$ language plpgsql;

Why not use the block labeling syntax we already have?

create or replace function bubu(a int, b int)
returns void as $$
<< b >>
begin
  raise notice '% %', b.a, b.b;
end;
$$ language plpgsql;

That doesn't currently work, but it could be made to.
-- 
Vik Fearing



pgsql-hackers by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: CREATE AGGREGATE array_cat
Next
From: Chapman Flack
Date:
Subject: Re: CREATE AGGREGATE array_cat