Re: Use of 'cp -r' in CREATE DATABASE

Поиск
Список
Период
Сортировка
От Nigel J. Andrews
Тема Re: Use of 'cp -r' in CREATE DATABASE
Дата
Msg-id Pine.LNX.4.21.0312120043590.27785-100000@ponder.fairway2k.co.uk
обсуждение исходный текст
Ответ на Re: Use of 'cp -r' in CREATE DATABASE  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
Ответы Re: Use of 'cp -r' in CREATE DATABASE  (Bruce Momjian <pgman@candle.pha.pa.us>)
Re: Use of 'cp -r' in CREATE DATABASE  ("Andrew Dunstan" <andrew@dunslane.net>)
Список pgsql-hackers
On Thu, 11 Dec 2003, Alvaro Herrera wrote:

> On Thu, Dec 11, 2003 at 06:36:05PM -0500, Bruce Momjian wrote:
> > Our dbcommands.c has for create database:
> > 
> >     snprintf(buf, sizeof(buf), "cp -r '%s' '%s'", src_loc, target_dir);
> > 
> [...]
> > 
> > I think we should switch to -R in our code.
> 
> But you will have to write special code for Win32, won't you?
> Maybe it would be better to avoid using system commands
> altogether and copy the whole thing using syscalls ...

That was my immediate thought. Unfortunately that means reinventing the
wheel; or grabbing it from BSD or somewhere and distributing it with
postgresql.


-- 
Nigel J. Andrews



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

Предыдущее
От: Philip Yarra
Дата:
Сообщение: Re: Use of 'cp -r' in CREATE DATABASE
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Use of 'cp -r' in CREATE DATABASE