Re: libpq environment variables in the server
Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Noah Misch <noah@leadboat.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2019-03-15T08:15:24Z
Lists: pgsql-hackers
On 2019-03-15 05:00, Noah Misch wrote:
> I consider the following style more idiomatic:
>
> {
> local %ENV;
> delete $ENV{PGAPPNAME};
> ...
> }
That doesn't work because the first line clears the entire environment.
What does work is
{
delete local $ENV{PGAPPNAME};
...
}
But that is documented as new in Perl 5.12.0, so we might not be able to
use it. It appears to work in the 5.8.9 I have lying around, so I'm
confused.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Commits
-
Don't propagate PGAPPNAME through pg_ctl in tests
- 8e93a516e68b 12.0 landed