Re: SHOW ALL doesn't actually SHOW ALL - Mailing list pgsql-hackers

From David Fetter
Subject Re: SHOW ALL doesn't actually SHOW ALL
Date
Msg-id 20080820183447.GM7447@fetter.org
Whole thread Raw
In response to Re: SHOW ALL doesn't actually SHOW ALL  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Wed, Aug 20, 2008 at 01:56:50PM -0400, Tom Lane wrote:
> David Fetter <david@fetter.org> writes:
> > I've noticed that neither SHOW ALL nor SELECT ... FROM pg_settings
> > shows the value of custom GUCs, even though SHOW will do so for
> > any given one.
> 
> Yeah, that's intentional, because what the code is designed to do is
> allow GUC values for a user-written module to be specified before
> the user-written module has been loaded.  It's expecting the
> user-written code to come along and issue a DefineCustomXXXVariable
> call so that it will know how (or whether) to display the variable.

I'm not sure I understand why that's the right thing.  I stumbled
across it while trying to improve some SQL-only checks in DBI-Link,
and since SHOW doesn't quite act like SELECT, it's causing some
trouble.

> This ties back into previous discussions about how using this
> facility for random user-set values is an abuse, and we ought to
> instead provide some way of explicitly declaring user variables.

How about seeing what all of them are via SELECT?  I guess I'm missing
why pg_show_all_settings(), the function underlying the pg_settings
view, is actually doing
pg_show_settings_except_the_ones_you_actually_set() :P

Cheers,
David.

> 
>             regards, tom lane

-- 
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david.fetter@gmail.com

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [pgsql-www] [FINALLY] the TODO list has migrated to Wiki
Next
From: Bruce Momjian
Date:
Subject: Re: TODO item: Allow data to be pulled directly from indexes