Re: Visibility of a local variable - Mailing list pgsql-bugs

From David G. Johnston
Subject Re: Visibility of a local variable
Date
Msg-id CAKFQuwamy3VGC29STPvAJu0c9mMtOEknZX6FaWaw2idYGb5JPw@mail.gmail.com
Whole thread Raw
In response to Re: Visibility of a local variable  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
On Tue, Jun 4, 2024 at 10:05 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> On Monday, June 3, 2024, Alejandro Burne <adburne@gmail.com> wrote:
>> A local variable, created within a transaction, continues to persist
>> (without value) after the transaction has ended.

> This is under-documented but at present there is no plan to change this
> long-standing behavior, just document it better.

Keep in mind that this entire behavior (ie the ability to create GUCs
not declared in the C code) is an undocumented abuse of the GUC
system.  We probably can't get rid of it at this late date, but
we're very unlikely to make any incompatible changes in the behavior.


No, but this is another indication that there is demand for Pavel's schema variables feature that it would be nice to point to instead of saying this usable behavior is unsupported and has no supported alternatives.

David J.

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #18463: Possible bug in stored procedures with polymorphic OUT parameters
Next
From: Casey & Gina
Date:
Subject: Arrays are sorted when using intarray subtraction operator