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 cfd43269-b0e4-8b21-aabe-a11e4db86732@2ndquadrant.com
Whole thread Raw
In response to Re: libpq environment variables in the server  (Noah Misch <noah@leadboat.com>)
List pgsql-hackers
On 2019-03-15 16:01, Noah Misch wrote:
>>>>  {
>>>>      local %ENV;
>>>>      delete $ENV{PGAPPNAME};
>>>>      ...
>>>>  }
>>>
>>> That doesn't work because the first line clears the entire environment.
>>
>> The solution to that is to do 'local %ENV = %ENV;', to assign a copy of
>> the original to the localised variable.
> 
> That's the right thing, not what I wrote.  We use that in
> src/bin/initdb/t/001_initdb.pl.

Great.  Committed that way.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


pgsql-hackers by date:

Previous
From: Fabien COELHO
Date:
Subject: Re: Make pg_checksums complain if compiled BLCKSZ and data folder'sblock size differ
Next
From: Fabien COELHO
Date:
Subject: RE: Timeout parameters