Re: pg_get_functiondef forgets about most GUC_LIST_INPUT GUCs

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>, pavel.stehule@gmail.com, a.zakirov@postgrespro.ru, pgsql-hackers@postgresql.org
Date: 2018-03-22T01:20:39Z
Lists: pgsql-hackers
On Wed, Mar 21, 2018 at 01:40:23AM -0400, Tom Lane wrote:
> Michael Paquier <michael@paquier.xyz> writes:
>> On Tue, Mar 20, 2018 at 01:27:35PM -0400, Tom Lane wrote:
>>> +       if (flags & GUC_LIST_QUOTE)
>>> +               elog(FATAL, "extensions cannot define GUC_LIST_QUOTE variables");
> 
>> This would be better as an ereport with ERRCODE_FEATURE_NOT_SUPPORTED I
>> think.  An ERROR is better in my opinion.
> 
> I don't mind making it an ereport, but I think it needs to be FATAL
> for the reason stated in the comment.

Okay for the FATAL.  I can see that at this time of the day your patch
0002 has already been pushed as 846b5a5 with an elog().  Still, it seems
to me that this is not an internal error but an error caused by an
external cause which can be user-visible, so I would push forward with
switching it to an ereport().
--
Michael

Commits

  1. Prevent extensions from creating custom GUCs that are GUC_LIST_QUOTE.

  2. Fix mishandling of quoted-list GUC values in pg_dump and ruleutils.c.