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

From: Julien Rouhaud <rjuju123(at)gmail(dot)com>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Hannu Krosing <hannuk(at)google(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: 2022-01-06 09:05:32
Message-ID: Ydaw3J1eigk4x9Dj@jrouhaud
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jan 06, 2022 at 08:52:23AM +0100, Pavel Stehule wrote:
>
> I am not sure if there is enough agreement and if there is enough necessity
> for this feature.
>
> In this discussion there were more general questions about future
> development of plpgsql (about possible configurations and compiler
> parametrizations, and how to switch the configuration on global and on
> local levels). This is not fully solved yet. This is probably the reason
> why discussion about this specific feature (and very simple feature) has
> not reached a clear end. Generally, this is the same problem in Postgres.

I agree, but on the other hand I don't see how defining a top level block
alias identical for every single plpgsql function would really make sense.
Not every function has a very long name and would benefit from it, and no one
can really assume that e.g. "root" or whatever configured name won't be used in
any plpgsql function on that database or cluster. So while having some global
configuration infrastructure can be useful I still don't think that it could be
used for this purpose.

Anyway, the only committer that showed some interest in the feature is Michael,
and he seemed ok in principle with the "alias-implementation" approach.
Michael, did you have a look at this version ([1]), or do you think it should
simply be rejected?

[1]: https://www.postgresql.org/message-id/attachment/120789/plpgsql-routine-label-option-alias-implementation.patch

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2022-01-06 09:41:30 Re: Column Filtering in Logical Replication
Previous Message Thomas Munro 2022-01-06 08:46:42 Re: Make relfile tombstone files conditional on WAL level