From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Richard Huxton <dev(at)archonet(dot)com> |
Cc: | Mark Harrison <mh(at)pixar(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: createdb feature request |
Date: | 2004-02-11 23:23:50 |
Message-ID: | 24074.1076541830@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Richard Huxton <dev(at)archonet(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Chris Smith | 2004-02-11 23:25:20 | Wire protocol v3 details |
Previous Message | Tom Lane | 2004-02-11 23:12:51 | Re: Prepared queries |