Re: Re: [COMMITTERS] pgsql: Don't use "cp -i" in the example WAL archive_command.

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Re: [COMMITTERS] pgsql: Don't use "cp -i" in the example WAL archive_command.
Дата
Msg-id 201106191200.p5JC0ew08567@momjian.us
обсуждение исходный текст
Ответ на Re: Re: [COMMITTERS] pgsql: Don't use "cp -i" in the example WAL archive_command.  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Re: [COMMITTERS] pgsql: Don't use "cp -i" in the example WAL archive_command.  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-hackers
Tom Lane wrote:
> Bruce Momjian <bruce@momjian.us> writes:
> > Perhaps we should recommend:
> >     cd /path && test ! -f %f && cp %p %f
> > That is shorter and removes the duplicate problem.
> 
> Um ... %p is relative to the database directory.

Oh, I see now.  I had thought it was an absolute path, but good thing it
isn't because of the possible need for quoting characters in the path
name.

The only other idea I have is:
NEW=/path && test ! -f $NEW/%f && cp %p $NEW/%f

but that is not going to work with csh-based shells, while I think the
original is fine.

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + It's impossible for everything to be true. +


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

Предыдущее
От: Florian Pflug
Дата:
Сообщение: Re: patch for 9.2: enhanced errors
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: patch for 9.2: enhanced errors