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

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Julien Rouhaud <rjuju123(at)gmail(dot)com>
Cc: Vik Fearing <vik(at)postgresfriends(dot)org>, Chapman Flack <chap(at)anastigmatix(dot)net>, 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: 2021-03-13 11:10:29
Message-ID: CAFj8pRBc891fcfgJ2LkgvMYn6fB3ErJU4WiYBu3u6mt5m6d3RA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi

so 13. 3. 2021 v 9:53 odesílatel Julien Rouhaud <rjuju123(at)gmail(dot)com> napsal:

> I think that this can be a useful feature in many occasions, especially
> since
> the overhead is almost inexistent.
>
> The implementation is sensible and there are regression tests to cover the
> new
> feature.
>
> There's a problem however if you try to add multiple #routine_label
> commands in
> the same function. At minimum the Assert on "nse->itemno == (int)
> PLPGSQL_LABEL_BLOCK" will fail.
>
> I don't think that it makes sense to have multiple occurences of this
> command,
> and we should simply error out if plpgsql_curr_compile->root_ns->itemno is
> PLPGSQL_LABEL_REPLACED. If any case this should also be covered in the
> regression tests.
>

I did it. Thank you for check

I wrote few sentences to documentation

Regards

Pavel

Attachment Content-Type Size
plpgsql-routine-label-option-v4.patch text/x-patch 9.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Mark Rofail 2021-03-13 11:42:38 Re: [HACKERS] GSoC 2017: Foreign Key Arrays
Previous Message Fabien COELHO 2021-03-13 11:09:37 Re: pgbench: option delaying queries till connections establishment?