Re: Declaring a field that is also an out parameter in a function

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: Michael Nolan <htfoot(at)gmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Declaring a field that is also an out parameter in a function
Date: 2024-07-07 14:37:47
Message-ID: 683483.1720363067@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> writes:
> (2024-07-07 09:27:14) postgres=# select * from
> plpgsql_check_function('test_function');
> ┌───────────────────────────────────────────────────────────────┐
> │ plpgsql_check_function │
> ╞═══════════════════════════════════════════════════════════════╡
> │ warning:00000:10:statement block:parameter "d3" is overlapped │
> │ Detail: Local variable overlap function parameter. │

Nice! FWIW, I think the standard terminology is "local variable
shadows function parameter".

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Pavel Stehule 2024-07-07 14:42:07 Re: Declaring a field that is also an out parameter in a function
Previous Message Michael Nolan 2024-07-07 13:01:23 Re: Declaring a field that is also an out parameter in a function