Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eyWUK-00006z-3l for pgsql-hackers@arkaria.postgresql.org; Wed, 21 Mar 2018 05:40:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1eyWUI-0008Qn-6e for pgsql-hackers@arkaria.postgresql.org; Wed, 21 Mar 2018 05:40:38 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eyWUH-0008Po-SZ for pgsql-hackers@lists.postgresql.org; Wed, 21 Mar 2018 05:40:38 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eyWUF-0003Q4-9e for pgsql-hackers@postgresql.org; Wed, 21 Mar 2018 05:40:36 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w2L5eN8g022580; Wed, 21 Mar 2018 01:40:23 -0400 From: Tom Lane To: Michael Paquier cc: Kyotaro HORIGUCHI , pavel.stehule@gmail.com, a.zakirov@postgrespro.ru, pgsql-hackers@postgresql.org Subject: Re: pg_get_functiondef forgets about most GUC_LIST_INPUT GUCs In-reply-to: <20180321050103.GD2288@paquier.xyz> References: <2637.1521501336@sss.pgh.pa.us> <20180320003951.GA4963@paquier.xyz> <10037.1521515233@sss.pgh.pa.us> <20180320.123747.43512160.horiguchi.kyotaro@lab.ntt.co.jp> <32403.1521566855@sss.pgh.pa.us> <20180321050103.GD2288@paquier.xyz> Comments: In-reply-to Michael Paquier message dated "Wed, 21 Mar 2018 14:01:03 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <22578.1521610823.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 21 Mar 2018 01:40:23 -0400 Message-ID: <22579.1521610823@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Michael Paquier 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 va= riables"); > 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. >> + record =3D find_option(name, false, WARNING); >> + if (record =3D=3D NULL) > LOG instead of WARNING? I did it like that to match the similar code in flatten_set_variable_args. In the end it doesn't matter, because find_option only uses its elevel argument when create_placeholders is passed as true. regards, tom lane