Re: [HACKERS] allowed user/db variables

From: Joe Conway <mail(at)joeconway(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andreas Pflug <Andreas(dot)Pflug(at)web(dot)de>, Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, "Patches (PostgreSQL)" <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [HACKERS] allowed user/db variables
Date: 2003-06-25 23:30:17
Message-ID: 3EFA3089.9020801@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

(moved to PATCHES)

Tom Lane wrote:
> I agree with this plan also. I'm not sure if the RH guys had intended
> to get around to this or not --- it's not on their shortlist of stuff
> they need for their tools.
>
> The proposed patch from RH includes addition of descriptions to the
> variables' table entries in guc.c. It might make sense to include these
> as a column in pg_settings as well; but if we do then changing the view
> would have to wait till that patch is submitted and accepted. (I was
> offline yesterday but it doesn't look like anything's been done; I will
> remind 'em that feature freeze is hard upon us.)

Here is a patch to expand pg_settings. I included more than discussed
because it was easy and I thought it might be useful. Let me know if you
want some of them removed.

Passes all regression tests.

I'll send in a documentation patch once I'm sure what new columns we are
actually going to add (i.e. this patch, descriptions, or some
combination thereof).

If there are no objections, please apply.

Joe

p.s. here is some sample (expanded) output:

regression=# select * from pg_settings;
-[ RECORD 1 ]----+--------------------------------------
name | add_missing_from
setting | on
context | user
vartype | bool
reset_source | default
session_source | default
tentative_source | default
source | default
boot_val |
reset_val | on
session_val | on
tentative_val | off
min_val |
max_val |

[ ... ]

-[ RECORD 14 ]---+--------------------------------------
name | DateStyle
setting | ISO with US (NonEuropean) conventions
context | user
vartype | string
reset_source | default
session_source | default
tentative_source | default
source | default
boot_val | ISO, US
reset_val | ISO, US
session_val | ISO, US
tentative_val |
min_val |
max_val |
-[ RECORD 15 ]---+--------------------------------------
name | db_user_namespace
setting | off
context | sighup
vartype | bool
reset_source | default
session_source | default
tentative_source | default
source | default
boot_val |
reset_val | off
session_val | off
tentative_val | off
min_val |
max_val |

[ ... ]

-[ RECORD 26 ]---+--------------------------------------
name | effective_cache_size
setting | 1000
context | user
vartype | real
reset_source | default
session_source | default
tentative_source | default
source | default
boot_val |
reset_val | 1000
session_val | 1000
tentative_val | 0
min_val | 0
max_val | 1.79769e+308

[ ... ]

-[ RECORD 55 ]---+--------------------------------------
name | log_duration
setting | off
context | super-user
vartype | bool
reset_source | default
session_source | default
tentative_source | default
source | default
boot_val |
reset_val | off
session_val | off
tentative_val | off
min_val |
max_val |

[ ... ]

-[ RECORD 83 ]---+--------------------------------------
name | shared_buffers
setting | 64
context | postmaster
vartype | integer
reset_source | default
session_source | default
tentative_source | default
source | default
boot_val |
reset_val | 64
session_val | 64
tentative_val | 0
min_val | 16
max_val | 2147483647

Attachment Content-Type Size
pg_settings_expanded.1.patch text/plain 20.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message The Hermit Hacker 2003-06-25 23:33:04 Re: RServ patch to support multiple slaves (sorta)
Previous Message Alvaro Herrera 2003-06-25 22:44:07 Re: RServ patch to support multiple slaves (sorta)

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2003-06-25 23:52:56 Re: [HACKERS] allowed user/db variables
Previous Message Josh Berkus 2003-06-25 23:00:08 Re: Runtime.SGML diff ... please expedite!