Re: initdb.sh fixed

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: initdb.sh fixed
Дата
Msg-id Pine.LNX.4.21.9912181430440.356-100000@localhost.localdomain
обсуждение исходный текст
Ответ на initdb.sh fixed  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: initdb.sh fixed  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
People, I thought you would at least test this once before applying it. I
explicitly (maybe not explicitly enough) mentioned it, because writing
complex shell scripts is a nut job. Maybe this thing should really be
written in C. Then there will be no EUID, no echo, no function, no grep,
no whoami, or other problems. Perhaps the whole genbki.sh thing could be
scrapped then, with initdb interpreting the DATA() macros itself. It
would even reduce the overhead of calling postgres about 12 times and
could get it down to 2 or 3. A project for 7.1?

On 1999-12-17, Bruce Momjian mentioned:

> OK, initdb should now work.  There were a variety of non-portable things
> in initdb.sh, like assuming $EUID is defined, and other shell script and
> command args that do not exist on BSDI.

Hmm, that $EUID seems to have be the root of all trouble because then the
'insert ( data data data )' bootstrap commands are containing gaps. On the
other hand, this was one of the key things that were supposed to be
improved because relying on $USER was not su-safe. Maybe $UID would work,
since initdb isn't supposed to be setuid anyway.

> I think I got them all.  If anyone sees problems, let me know.  This is
> not really Peter's fault.  It takes a long time to know what is
> portable and what is not portable.

The more time I spend with this the more I think that the only thing
that's portable is echo. Oh wait, that's not portable either. :)

-- 
Peter Eisentraut                  Sernanders väg 10:115
peter_e@gmx.net                   75262 Uppsala
http://yi.org/peter-e/            Sweden






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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: [HACKERS] Anyone for prettyprinted EXPLAIN VERBOSE?
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: initdb.sh fixed