Re: [patch] GUC source file and line number]

From: Greg Smith <gsmith(at)gregsmith(dot)com>
To: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [patch] GUC source file and line number]
Date: 2008-09-04 19:20:05
Message-ID: Pine.GSO.4.64.0809041459560.210@westnet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 4 Sep 2008, Kevin Grittner wrote:

> Personally, I would take the "Min", "Default", and "Max" to mean what
> Greg intends; it's the "Current" one that gives me pause.

That's the output of current_setting(name) which shows what it is right
now; no more, no less. See
http://www.postgresql.org/docs/current/interactive/sql-show.html and
http://www.postgresql.org/docs/current/interactive/functions-admin.html

That shows the parameter as the admin/usr set it, whereas the "setting"
column in pg_settings displays in terms of the internal units. Example
session showing how that all fits together:

pg=# select current_setting('work_mem');
current_setting
-----------------
1GB
(1 row)

pg=# set work_mem='256MB';
SET

pg=# select current_setting('work_mem');
current_setting
-----------------
256MB
(1 row)

pg=# select setting,unit from pg_settings where name='work_mem';
setting | unit
---------+------
262144 | kB
(1 row)

Since the word "current" isn't actually in the patch anywhere, and only
appears in that little sample usage snippet I provided, whether or not
it's a good name for that doesn't impact the patch itself.

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2008-09-04 20:06:18 Re: Need more reviewers!
Previous Message Tom Lane 2008-09-04 19:11:41 Re: Need more reviewers!