Re: Postgresql.conf, initdb patch

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: Postgresql.conf, initdb patch
Date: 2003-07-01 00:09:04
Message-ID: Pine.LNX.4.44.0307010140270.3958-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)gmx(dot)net

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Peter Eisentraut 2003-07-01 00:09:40 Re: Patch for listing runtime option details through server
Previous Message Peter Eisentraut 2003-07-01 00:08:27 Re: Datetime patch