Re: pg_get_functiondef forgets about most GUC_LIST_INPUT GUCs

Поиск
Список
Период
Сортировка
Искать
От
Arthur Zakirov
Тема
Re: pg_get_functiondef forgets about most GUC_LIST_INPUT GUCs
Дата
Msg-id
20180220154656.GA7518@zakirov.localdomain
Ответ на
Список
Дерево обсуждения
pg_get_functiondef forgets about most GUC_LIST_INPUT GUCs Michael Paquier <michael.paquier@gmail.com>
Re: pg_get_functiondef forgets about most GUC_LIST_INPUT GUCs Tom Lane <tgl@sss.pgh.pa.us>
Re: pg_get_functiondef forgets about most GUC_LIST_INPUT GUCs Michael Paquier <michael.paquier@gmail.com>
Re: pg_get_functiondef forgets about most GUC_LIST_INPUT GUCs Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: pg_get_functiondef forgets about most GUC_LIST_INPUT GUCs Michael Paquier <michael@paquier.xyz>
Re: pg_get_functiondef forgets about most GUC_LIST_INPUT GUCs Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: pg_get_functiondef forgets about most GUC_LIST_INPUT GUCs Pavel Stehule <pavel.stehule@gmail.com>
Re: pg_get_functiondef forgets about most GUC_LIST_INPUT GUCs Michael Paquier <michael@paquier.xyz>
Re: pg_get_functiondef forgets about most GUC_LIST_INPUT GUCs Pavel Stehule <pavel.stehule@gmail.com>
Re: pg_get_functiondef forgets about most GUC_LIST_INPUT GUCs Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
Re: pg_get_functiondef forgets about most GUC_LIST_INPUT GUCs Michael Paquier <michael@paquier.xyz>
Re: pg_get_functiondef forgets about most GUC_LIST_INPUT GUCs Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
Re: pg_get_functiondef forgets about most GUC_LIST_INPUT GUCs Tom Lane <tgl@sss.pgh.pa.us>
Re: pg_get_functiondef forgets about most GUC_LIST_INPUT GUCs Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
Re: pg_get_functiondef forgets about most GUC_LIST_INPUT GUCs Michael Paquier <michael@paquier.xyz>
Re: pg_get_functiondef forgets about most GUC_LIST_INPUT GUCs Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
Re: pg_get_functiondef forgets about most GUC_LIST_INPUT GUCs Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: pg_get_functiondef forgets about most GUC_LIST_INPUT GUCs Michael Paquier <michael@paquier.xyz>
Re: pg_get_functiondef forgets about most GUC_LIST_INPUT GUCs Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: pg_get_functiondef forgets about most GUC_LIST_INPUT GUCs Michael Paquier <michael@paquier.xyz>
Re: pg_get_functiondef forgets about most GUC_LIST_INPUT GUCs Michael Paquier <michael@paquier.xyz>
Re: pg_get_functiondef forgets about most GUC_LIST_INPUT GUCs Pavel Stehule <pavel.stehule@gmail.com>
Re: pg_get_functiondef forgets about most GUC_LIST_INPUT GUCs Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
Re: pg_get_functiondef forgets about most GUC_LIST_INPUT GUCs Pavel Stehule <pavel.stehule@gmail.com>
Re: pg_get_functiondef forgets about most GUC_LIST_INPUT GUCs Michael Paquier <michael@paquier.xyz>
Re: pg_get_functiondef forgets about most GUC_LIST_INPUT GUCs Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
Re: pg_get_functiondef forgets about most GUC_LIST_INPUT GUCs Tom Lane <tgl@sss.pgh.pa.us>
Re: pg_get_functiondef forgets about most GUC_LIST_INPUT GUCs Michael Paquier <michael@paquier.xyz>
Re: pg_get_functiondef forgets about most GUC_LIST_INPUT GUCs Tom Lane <tgl@sss.pgh.pa.us>
Re: pg_get_functiondef forgets about most GUC_LIST_INPUT GUCs Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
Re: pg_get_functiondef forgets about most GUC_LIST_INPUT GUCs Tom Lane <tgl@sss.pgh.pa.us>
Re: pg_get_functiondef forgets about most GUC_LIST_INPUT GUCs Michael Paquier <michael@paquier.xyz>
Re: pg_get_functiondef forgets about most GUC_LIST_INPUT GUCs Tom Lane <tgl@sss.pgh.pa.us>
Re: pg_get_functiondef forgets about most GUC_LIST_INPUT GUCs Michael Paquier <michael@paquier.xyz>
Re: pg_get_functiondef forgets about most GUC_LIST_INPUT GUCs Tom Lane <tgl@sss.pgh.pa.us>
Hello,

On Fri, Jan 12, 2018 at 10:24:40AM +0900, Michael Paquier wrote:
> OK, I can live with that. What do you think about the attached? I'll be
> happy to produce patches for back-branches as necessary. When an option
> is not found, I have made the function return 0 as value for the flags,
> which is consistent with flatten_set_variable_args(). To make things
> behave more consistently with GUC_LIST_QUOTE GUCs, it seems to me that
> those should not be quoted as well (ALTER SYSTEM shares the same
> compatibility). And attached is a patch.

Just 2 cents from me. It seems that there is a problem with extensions
GUCs. For example:

=# CREATE FUNCTION func_with_set_params() RETURNS integer
    AS 'select 1;'
    LANGUAGE SQL
    set plpgsql.extra_errors to 'shadowed_variables';
=# SELECT pg_get_functiondef('func_with_set_params'::regproc);
                    pg_get_functiondef                    
----------------------------------------------------------
 CREATE OR REPLACE FUNCTION public.func_with_set_params()+
  RETURNS integer                                        +
  LANGUAGE sql                                           +
  SET "plpgsql.extra_errors" TO 'shadowed_variables'     +
 AS $function$select 1;$function$                        +

It is good while plpgsql is loaded. But when we exit the session and try
it again in another:

=# SELECT pg_get_functiondef('func_with_set_params'::regproc);
ERROR:  unrecognized configuration parameter "plpgsql.extra_errors"

-- 
Arthur Zakirov
Postgres Professional: http://www.postgrespro.com
Russian Postgres Company

В списке pgsql-hackers по дате отправления
От: Magnus Hagander
Дата:
От: Matheus de Oliveira
Дата:
FAQ