Peter Eisentraut <[EMAIL PROTECTED]> writes:
> How do you find out if a directory is empty?
Good question.
> The best way I could think of is this:
> test x"`ls -A "$PGDATA"`" = x
The embedded quotes might confuse some shells, no? Perhaps better
CONTENTS=`ls -A "$PGDATA"`
if t
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
"Len Morgan" <[EMAIL PROTECTED]> writes:
> The reason that IMHO this deserves a little consideration (i.e., doing it at
> all rather than just saying "Don't store any files in PG_DATA") is that
> RedHat based rpm installations create the postgres superuser account as part
> of the process and set
Tom Lane wrote:
> Peter Eisentraut <[EMAIL PROTECTED]> writes:
> >> It seems like it would be a whole lot "nicer" if initdb only deleted
> >> the files that it attempted to create OR if the default was not to
> >> delete anything.
>
> > Okay, I could go for the former. What do others think?
>
> I
>> A slightly more reasonable example is where the admin has already
>> inserted his own pg_hba.conf in the directory; would be nice if initdb
>> didn't overwrite it (nor delete it on failure), but I'm not sure it's
>> worth the trouble.
>
>I am inclined to leave it as is too. I can imagine many
> A slightly more reasonable example is where the admin has already
> inserted his own pg_hba.conf in the directory; would be nice if initdb
> didn't overwrite it (nor delete it on failure), but I'm not sure it's
> worth the trouble.
I am inclined to leave it as is too. I can imagine many bug re
Peter Eisentraut <[EMAIL PROTECTED]> writes:
>> It seems like it would be a whole lot "nicer" if initdb only deleted
>> the files that it attempted to create OR if the default was not to
>> delete anything.
> Okay, I could go for the former. What do others think?
It'd be a bit of a pain but I ca
Jeffery Collins writes:
> It seems like it would be a whole lot "nicer" if initdb only deleted
> the files that it attempted to create OR if the default was not to
> delete anything.
Okay, I could go for the former. What do others think?
--
Peter Eisentraut Sernanders väg 10:1