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

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>, Hannu Krosing <hannuk(at)google(dot)com>
Cc: Julien Rouhaud <rjuju123(at)gmail(dot)com>, 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-24 07:09:13
Message-ID: CAFj8pRAJyepF06WYiRUmkz4Qr5jrC3EyXYUa5xX4C5vsQWg8DQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

st 17. 3. 2021 v 23:32 odesílatel Michael Paquier <michael(at)paquier(dot)xyz>
napsal:

> On Wed, Mar 17, 2021 at 05:04:48PM +0100, Pavel Stehule wrote:
> > This tree has a different direction than is usual, and then replacing the
> > root node is not simple.
>
> Yeah, it is not like we should redesign this whole part just for the
> feature discussed here, and that may impact performance as the current
> list handling is cheap now.
>
> > Second solution (significantly more simple) is an additional pointer in
> > ns_item structure. In almost all cases this pointer will not be used.
> > Because ns_item uses a flexible array, then union cannot be used. I
> > implemented this in a patch marked as "alias-implementation".
> >
> > What do you think about it?
>
> I am not sure that it is necessary nor good to replace entirely the
> root label. So associating a new field directly into it sounds like a
> promising approach?
>

Here is rebased patch

I am continuing to talk with Hannu about syntax. I think so using the
compile option is a good direction, but maybe renaming from "routine_label"
to "topscope_label" (proposed by Hannu) or maybe "outerscope_label" can be
a good idea.

Regards

Pavel

--
> Michael
>

Attachment Content-Type Size
plpgsql-routine-label-20210324.patch text/x-patch 9.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message tanghy.fnst@fujitsu.com 2021-03-24 07:31:18 RE: Logical Replication vs. 2PC
Previous Message Drouvot, Bertrand 2021-03-24 06:56:51 Re: Minimal logical decoding on standbys