Re: show() function - Mailing list pgsql-patches

From Joe Conway
Subject Re: show() function
Date
Msg-id 3D17FFB9.2090204@joeconway.com
Whole thread Raw
In response to Re: show() function  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: show() function
List pgsql-patches
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






pgsql-patches by date:

Previous
From: "Dave Page"
Date:
Subject: Re: [ODBC] ODBC Patch to prevent setting of KSQO on 7.3+ servers
Next
From: Tom Lane
Date:
Subject: Re: show() function