Re: initdb and "exit_nicely"...

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: initdb and "exit_nicely"...
Дата
Msg-id 862.959298997@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: initdb and "exit_nicely"...  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-general
Peter Eisentraut <peter_e@gmx.net> 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 test "x$CONTENTS" = x

> Are we talking 7.0.1 material, btw?

Well, we would be if we were sure of the patch.  I'm a little worried
about portability though.  Given that this isn't a very critical issue
(IMHO) I'd recommend saving it for the 7.1 cycle.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: PG 7.0 vacuum problem
Следующее
От: Marcin Inkielman
Дата:
Сообщение: Re: PG 7.0 vacuum problem