By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,571 Members | 966 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,571 IT Pros & Developers. It's quick & easy.

createdb feature request

P: n/a
Apache has a nice feature: it creates copies of all the default
configuration files, so that it's easy to diff and see what has
been modified in the config files.

Can this be included in createdb as well?

Thanks,
Mark

Here's a patch:
*** initdb.sh-orig 2004-02-11 11:25:49.000000000 -0800
--- initdb.sh 2004-02-11 11:28:35.000000000 -0800
***************
*** 608,615 ****
--- 608,620 ----
fi
cp "$PG_IDENT_SAMPLE" "$PGDATA"/pg_ident.conf || exit_nicely

+ cp "$PGDATA"/pg_ident.conf "$PGDATA"/pg_ident.conf.default || exit_nicely
+ cp "$PGDATA"/pg_hba.conf "$PGDATA"/pg_hba.conf.default || exit_nicely
+ cp "$PGDATA"/postgresql.conf "$PGDATA"/postgresql.conf.default || exit_nicely
chmod 0600 "$PGDATA"/pg_hba.conf "$PGDATA"/pg_ident.conf \
"$PGDATA"/postgresql.conf
+ chmod 0600 "$PGDATA"/pg_hba.conf.default "$PGDATA"/pg_ident.conf.default \
+ "$PGDATA"/postgresql.conf.default

echo "ok"
---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Nov 22 '05 #1
Share this Question
Share on Google+
3 Replies

P: n/a
Mark Harrison wrote:
Apache has a nice feature: it creates copies of all the default
configuration files, so that it's easy to diff and see what has
been modified in the config files.

Can this be included in createdb as well?


Uh, the defaults are already in /pgsql/share.

--
Bruce Momjian | http://candle.pha.pa.us
pg***@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Nov 22 '05 #2

P: n/a
On Wednesday 11 February 2004 19:49, Mark Harrison wrote:
Apache has a nice feature: it creates copies of all the default
configuration files, so that it's easy to diff and see what has
been modified in the config files.

Can this be included in createdb as well?


Postfix has a useful utility called "postconf"
postconf => display all settings
postconf foo => display setting foo
postconf -n => display non-standard config settings
Other stuff too, see http://www.postfix.org/postconf.1.html

Standard procedure for problems on the postfix list is to ask for "postconf
-n" output before anything else.
--
Richard Huxton
Archonet Ltd

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Nov 22 '05 #3

P: n/a
Richard Huxton <de*@archonet.com> writes:
Postfix has a useful utility called "postconf"
postconf => display all settings
postconf foo => display setting foo
postconf -n => display non-standard config settings
Other stuff too, see http://www.postfix.org/postconf.1.html Standard procedure for problems on the postfix list is to ask for "postconf
-n" output before anything else.


Hmm. The SQL-ish way to do this would be

select name, setting, source from pg_settings
where setting != default_value;

The compiled-in default value for each GUC variable is available in the
GUC data structure, but pg_settings doesn't currently expose it.
Possibly we should add that.

You can almost do it today with

select name, setting, source from pg_settings
where source != 'default';

but this clutters the output a little with values that have been
explicitly set but are still equal to the default. For instance,
I get

regression=# select name, setting, source from pg_settings
regression-# where source != 'default';
name | setting | source
-----------------------+----------------+----------------------
fsync | off | command line
lc_collate | C | override
lc_ctype | C | override
lc_messages | C | database
lc_monetary | C | database
lc_numeric | C | database
lc_time | C | database
max_connections | 100 | configuration file
server_encoding | SQL_ASCII | override
shared_buffers | 1000 | configuration file
tcpip_socket | on | command line
TimeZone | EST5EDT | environment variable
transaction_isolation | read committed | override
transaction_read_only | off | override
(14 rows)

Not sure if it's worth any work to shorten that.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ma*******@postgresql.org)

Nov 22 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.