Re: show() function

Поиск
Список
Период
Сортировка
От Joe Conway
Тема Re: show() function
Дата
Msg-id 3D17FFB9.2090204@joeconway.com
обсуждение исходный текст
Ответ на Re: show() function  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: show() function  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: "Dave Page"
Дата:
Сообщение: Re: [ODBC] ODBC Patch to prevent setting of KSQO on 7.3+ servers
Следующее
От: Tom Lane
Дата:
Сообщение: Re: show() function