Re: libpq environment variables in the server - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: libpq environment variables in the server
Date
Msg-id 872a3a54-a169-acfc-322a-f6c5b8e89ece@2ndquadrant.com
Whole thread Raw
In response to Re: libpq environment variables in the server  (Noah Misch <noah@leadboat.com>)
Responses Re: libpq environment variables in the server
List 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


pgsql-hackers by date:

Previous
From: Michael Banck
Date:
Subject: Re: Offline enabling/disabling of data checksums
Next
From: "Kato, Sho"
Date:
Subject: RE: Fix typo in test code comments