Re: Visibility of a local variable

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: Alejandro Burne <adburne(at)gmail(dot)com>, "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: Visibility of a local variable
Date: 2024-06-04 17:05:57
Message-ID: 479909.1717520757@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"David G. Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> writes:
> On Monday, June 3, 2024, Alejandro Burne <adburne(at)gmail(dot)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.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2024-06-04 17:29:25 Re: BUG #18463: Possible bug in stored procedures with polymorphic OUT parameters
Previous Message Pierre Forstmann 2024-06-04 16:09:45 Re: BUG #18494: hstore data type not recognized by Npgsql in PostgreSQL 16.3