Tom Lane writes:

> The idea I suggested a couple of days ago was that initdb should refuse
> to run if PGDATA exists and is nonempty.  Sound reasonable?

Okay, let's do that. How do you find out if a directory is empty? The best
way I could think of is this:

test x"`ls -A "$PGDATA"`" = x

Are we talking 7.0.1 material, btw?

-- 
Peter Eisentraut                  Sernanders väg 10:115
[EMAIL PROTECTED]                   75262 Uppsala
http://yi.org/peter-e/            Sweden

Reply via email to