ne 7. 7. 2024 v 0:14 odesílatel Tom Lane <tgl@sss.pgh.pa.us> napsal:
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.
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.