Tom Lane wrote:
> I agreed with your prior comments that making SHOW ALL return
> query-style output isn't a complete solution --- we should do that,
> but also the GUC variables should be exposed as a (read-only?) table
> or function returning set to allow query-language manipulations of the
> set. Unless someone's up for the pseudo-table implementation, a contrib
> function returning set seems reasonable.
>
I'm not sure I understand what you mean by a pseudo-table -- would a
table function wrapped in a system view (pg_settings?) be the same thing
as a pseudo-table?
Short of that, how's this for a plan:
1. New backend scalar function and guc.c/guc.h changes (as submitted
except the function name):
current_setting(text setting_name)
2. modify "SHOW X" to actually perform the equiv of:
select current_setting('X')
3. modify "SHOW ALL" to return query-style output ala EXPLAIN
4. submit contrib/showsettings, with a table function
current_settings(), which is a renamed version of the previously
submitted show_all_vars() function
Comments?
Joe