Use of 'cp -r' in CREATE DATABASE

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Use of 'cp -r' in CREATE DATABASE
Дата
Msg-id 200312112336.hBBNa5Y16507@candle.pha.pa.us
обсуждение исходный текст
Ответы Re: Use of 'cp -r' in CREATE DATABASE  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
Re: Use of 'cp -r' in CREATE DATABASE  (Philip Yarra <philip@utiba.com>)
Re: Use of 'cp -r' in CREATE DATABASE  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Our dbcommands.c has for create database:
   snprintf(buf, sizeof(buf), "cp -r '%s' '%s'", src_loc, target_dir);

but my BSD/OS manual only documents 'cp -R' and mentions:
    Historic versions of the cp utility had a -r option.  This implementation    supports that option, however, its use
isstrongly discouraged, as it    does not correctly copy special files, symbolic links or fifo's.
 

I think we should switch to -R in our code.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


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

Предыдущее
От: Alvaro Herrera Munoz
Дата:
Сообщение: Re: [COMMITTERS] pgsql-server/src/bin/initdb nls.mk po/it.po
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: pljava revisited