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-14 19:41:15
Message-ID: CAFj8pRCxyjEEk_F9gBudeX__=kgSjocvj6i6Rh3VEY9YkWMdnw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi

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

> On Sat, Mar 13, 2021 at 12:10:29PM +0100, Pavel Stehule wrote:
> >
> > so 13. 3. 2021 v 9:53 odesílatel Julien Rouhaud <rjuju123(at)gmail(dot)com>
> napsal:
> > >
> > > 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
>
> Thanks, LGTM.
>
> > I wrote few sentences to documentation
>
> Great!
>
> I just had a few cosmetic comments:
>
> + block can be changed by inserting special command at the start of
> the function
> [...]
> + arguments) is possible with option <literal>routine_label</literal>:
> [...]
> + errhint("The option \"routine_label\" can
> be used only once in rutine."),
> [...]
> +-- Check root namespace renaming (routine_label option)
>
> You're sometimes using "command" and "sometimes" option. Should we always
> use
> the same term, maybe "command" as it's already used for #variable_conflict
> documentation?
>
> Also
>
> + variables can be qualified with the function's name. The name of
> this outer
> + block can be changed by inserting special command at the start of
> the function
> + <literal>#routine_label new_name</literal>.
>
> It's missing a preposition before "special command". Maybe
>
> + variables can be qualified with the function's name. The name of
> this outer
> + block can be changed by inserting a special command
> + <literal>#routine_label new_name</literal> at the start of the
> function.
>
>
> + The function's argument can be qualified by function name:
>
> Should be "qualified with the function name"
>
> + Sometimes the function name is too long and can be more practical to
> use
> + some shorter label. An change of label of top namespace (with
> functions's
> + arguments) is possible with option <literal>routine_label</literal>:
>
> Few similar issues. How about:
>
> Sometimes the function name is too long and *it* can be more practical to
> use
> some shorter label. *The top namespace label can be changed* (*along* with
> *the* functions' arguments) *using the option*
> <literal>routine_label</literal>:
>
> I'm not a native English speaker so the proposes changed may be wrong or
> not
> enough.
>

My English is good enough for taking beer everywhere in the world :) . Ti
is not good, but a lot of people who don't understand to English understand
my simplified fork of English language.

Thank you for check

updated patch attached

Pavel

Attachment Content-Type Size
plpgsql-routine-label-option-v5.patch text/x-patch 9.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Corey Huinker 2021-03-14 19:49:27 A Case For Inlining Immediate Referential Integrity Checks
Previous Message Peter Geoghegan 2021-03-14 19:36:35 Re: New IndexAM API controlling index vacuum strategies