Re: Add default_val to pg_settings

From: Greg Smith <gsmith(at)gregsmith(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Add default_val to pg_settings
Date: 2008-10-06 01:50:40
Message-ID: Pine.GSO.4.64.0810052138590.28469@westnet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 25 Sep 2008, Simon Riggs wrote:

> So it would be useful to have a column that meant "if I run the RESET
> command it would return me to this value".

Patch v3 attached that exposes boot_val and reset_val. The docs for the
latter link to the RESET command page for details.

Sample, with default_text_search_config snipped to fit the rest into a
reasonable width:

# select name,setting,reset_val,boot_val from pg_settings where
setting!=boot_val or setting!=reset_val;

name | setting | reset_val | boot_val
-----------------------+--------------------+--------------+---------
archive_command | (disabled) | |
client_encoding | UTF8 | UTF8 | SQL_ASCII
lc_collate | en_US.UTF-8 | en_US.UTF-8 | C
lc_ctype | en_US.UTF-8 | en_US.UTF-8 | C
lc_messages | en_US.UTF-8 | en_US.UTF-8 |
lc_monetary | en_US.UTF-8 | en_US.UTF-8 | C
lc_numeric | en_US.UTF-8 | en_US.UTF-8 | C
lc_time | en_US.UTF-8 | en_US.UTF-8 | C
log_timezone | US/Eastern | US/Eastern | UNKNOWN
max_fsm_pages | 204800 | 204800 | 20000
max_stack_depth | 2048 | 2048 | 100
server_encoding | UTF8 | UTF8 | SQL_ASCII
shared_buffers | 4096 | 4096 | 1024
TimeZone | US/Eastern | US/Eastern | UNKNOWN
timezone_abbreviations | Default | Default | UNKNOWN
transaction_isolation | read committed | default |

--
* Greg Smith gsmith(at)gregsmith(dot)com http://www.gregsmith.com Baltimore, MD

Attachment Content-Type Size
guc-with-defaults-3.patch text/plain 14.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Philip Warner 2008-10-06 03:04:09 Re: parallel pg_restore design issues
Previous Message Andrew Dunstan 2008-10-06 00:11:48 parallel pg_restore design issues