Re: Postgresql.conf, initdb patch

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Postgresql.conf, initdb patch
Дата
Msg-id Pine.LNX.4.44.0307010140270.3958-100000@peter.localdomain
обсуждение исходный текст
Ответ на Postgresql.conf, initdb patch  (Josh Berkus <josh@agliodbs.com>)
Ответы Re: Postgresql.conf, initdb patch  (Shridhar Daithankar <shridhar_daithankar@persistent.co.in>)
Список pgsql-patches
Josh Berkus writes:

> initdb.patch, written by Shridhar, patches initdb so that the LC_*
> localization variables are inserted into postgresql.conf at the point
> commented "#LC VARS GO HERE!"

It's pretty pointless to use

cat $file | sed 's/.../'

because sed can open files perfectly well:

sed 's/.../' $file

You should clean up the temp files in exit_nicely(), because if someone or
something aborts initdb in the middle, then the trap will at least have a
better chance to remove the files.

Actually, I doubt that it's safe and/or polite to write temporary files in
the current directory.  If you want to see a better way to handle
temporary files in shell scripts, look in configure near occurences of
'mktemp'.

> As I'm not great a patch-making, I've also attached the completed
> postgresql.conf.sample for reference.

Use diff -c instead of plain diff and put the old file first and the new
file second.

--
Peter Eisentraut   peter_e@gmx.net


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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Datetime patch
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Patch for listing runtime option details through server