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

Reply via email to