Re: pl/pgsql feature request: shorthand for argument and local variable references

From: Vik Fearing <vik(at)postgresfriends(dot)org>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Chapman Flack <chap(at)anastigmatix(dot)net>
Cc: Jack Christensen <jack(at)jncsoftware(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: pl/pgsql feature request: shorthand for argument and local variable references
Date: 2020-11-19 00:53:48
Message-ID: 5d0d09a2-d7e0-a00f-8bdb-ee12fc02e902@postgresfriends.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Chapman Flack 2020-11-19 00:54:52 Re: CREATE AGGREGATE array_cat
Previous Message David G. Johnston 2020-11-19 00:46:52 Re: CREATE AGGREGATE array_cat