Re: libpq environment variables in the server

Поиск
Список
Период
Сортировка
От Noah Misch
Тема Re: libpq environment variables in the server
Дата
Msg-id 20190315150112.GD2607362@rfd.leadboat.com
обсуждение исходный текст
Ответ на Re: libpq environment variables in the server  (ilmari@ilmari.org (Dagfinn Ilmari Mannsåker))
Ответы Re: libpq environment variables in the server
Список pgsql-hackers
On Fri, Mar 15, 2019 at 10:06:29AM +0000, Dagfinn Ilmari Mannsåker wrote:
> Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:
> 
> > 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.
> 
> 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.


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Fabien COELHO
Дата:
Сообщение: Re: seems like a bug in pgbench -R
Следующее
От: David Rowley
Дата:
Сообщение: Re: Ordered Partitioned Table Scans