Re: libpq environment variables in the server

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Noah Misch <noah(at)leadboat(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: libpq environment variables in the server
Date: 2019-03-15 08:15:24
Message-ID: 872a3a54-a169-acfc-322a-f6c5b8e89ece@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kato, Sho 2019-03-15 08:16:25 RE: Fix typo in test code comments
Previous Message Michael Banck 2019-03-15 08:04:51 Re: Offline enabling/disabling of data checksums