Re: Declaring a field that is also an out parameter in a function - Mailing list pgsql-general

From David G. Johnston
Subject Re: Declaring a field that is also an out parameter in a function
Date
Msg-id CAKFQuwYnbcoHHeH6mqgsMJoMAR01YGLutpw3O3XaJ-ZSjNWdDg@mail.gmail.com
Whole thread Raw
In response to Re: Declaring a field that is also an out parameter in a function  (Michael Nolan <htfoot@gmail.com>)
List pgsql-general
On Sunday, July 7, 2024, Michael Nolan <htfoot@gmail.com> wrote:
On Sun, Jul 7, 2024 at 4:13 AM Pavel Stehule <pavel.stehule@gmail.com> wrote:
>
> but looks so there are false alarms related to using an alias. It is interesting so I have not any report about this issue, so probably using aliases is not too common today.

I'm not sure why there's a warning about using an alias. 43.3.1 says
to use them for improved readability.


Mostly because you should just name variables correctly the first time.  It improves readability if you use $n parameter names, which you should not.  As noted in 43.3.2, sometimes you don’t have a choice, though new and old aren’t usually problematic enough to warrant aliasing.

David J.

pgsql-general by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: Declaring a field that is also an out parameter in a function
Next
From: Adrian Klaver
Date:
Subject: Re: Declaring a field that is also an out parameter in a function