Re: Use of 'cp -r' in CREATE DATABASE - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Use of 'cp -r' in CREATE DATABASE
Date
Msg-id 20031212000455.GA22317@dcc.uchile.cl
Whole thread Raw
In response to Use of 'cp -r' in CREATE DATABASE  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: Use of 'cp -r' in CREATE DATABASE
List pgsql-hackers
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 ...

-- 
Alvaro Herrera (<alvherre[@]dcc.uchile.cl>)
"Use it up, wear it out, make it do, or do without"


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: pljava revisited
Next
From: "Timothy D. Witham"
Date:
Subject: Re: [Stp-devel] DBT-2 running against PostgreSQL and LVM2