From: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
---|---|
To: | Postgres hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | pg_get_functiondef forgets about most GUC_LIST_INPUT GUCs |
Date: | 2018-01-11 06:49:00 |
Message-ID: | 20180111064900.GA51030@paquier.xyz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi all,
While reviewing another patch related to the use of pg_strcasecmp in the
backend, I have noticed this bit in ruleutils.c:
/*
* Some GUC variable names are 'LIST' type and hence must not
* be quoted.
*/
if (pg_strcasecmp(configitem, "DateStyle") == 0
|| pg_strcasecmp(configitem, "search_path") == 0)
appendStringInfoString(&buf, pos);
else
simple_quote_literal(&buf, pos);
However this fails to consider all GUCs marked as GUC_LIST_INPUT, like
the recent wal_consistency_checking. guc.c already holds a find_option()
which can be used to retrieve the flags of a parameter. What about using
that and filtering by GUC_LIST_INPUT? This requires exposing the
function, and I am not sure what people think about that.
Thoughts?
--
Michael
From | Date | Subject | |
---|---|---|---|
Next Message | Kyotaro HORIGUCHI | 2018-01-11 06:59:10 | Re: [HACKERS] Restricting maximum keep segments by repslots |
Previous Message | Christian Ullrich | 2018-01-11 06:42:58 | RE: pl/perl extension fails on Windows |