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

From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: Use of 'cp -r' in CREATE DATABASE
Date: 2003-12-12 00:04:55
Message-ID: 20031212000455.GA22317@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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[(at)]dcc(dot)uchile(dot)cl>)
"Use it up, wear it out, make it do, or do without"

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Philip Yarra 2003-12-12 00:10:34 Re: Use of 'cp -r' in CREATE DATABASE
Previous Message Peter Eisentraut 2003-12-11 23:59:12 Re: pljava revisited