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

From Tom Lane
Subject Re: Declaring a field that is also an out parameter in a function
Date
Msg-id 577338.1720304029@sss.pgh.pa.us
Whole thread Raw
In response to Declaring a field that is also an out parameter in a function  (Michael Nolan <htfoot@gmail.com>)
Responses Re: Declaring a field that is also an out parameter in a function
List pgsql-general
Michael Nolan <htfoot@gmail.com> writes:
> Shouldn't declaring a field that is also an OUT parameter throw an error?

No.  The DECLARE is a block nested within the function,
and the parameter is declared at function scope.
So this is a standard case of an inner declaration masking
an outer one.

Possibly plpgsql_check can be set to complain about such cases,
but they're legal according to the language specification.

            regards, tom lane



pgsql-general by date:

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