Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e5wt3-0007QD-5P for pgsql-bugs@arkaria.postgresql.org; Sat, 21 Oct 2017 16:44:37 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1e5wt2-0004FI-FH for pgsql-bugs@arkaria.postgresql.org; Sat, 21 Oct 2017 16:44:36 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1e5wsJ-0002yk-3I for pgsql-bugs@postgresql.org; Sat, 21 Oct 2017 16:43:51 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1e5wsB-0006tA-IC for pgsql-bugs@postgresql.org; Sat, 21 Oct 2017 16:43:50 +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 v9LGhdrj020567; Sat, 21 Oct 2017 12:43:39 -0400 From: Tom Lane To: Michael Paquier cc: Andrew Dunstan , Dmitry Dolgov <9erthalion6@gmail.com>, Marko Tiikkaja , PostgreSQL mailing lists Subject: Re: BUG #14849: jsonb_build_object doesn't like VARIADIC calls very much In-reply-to: References: <20171011020058.27986.42308@wrigleys.postgresql.org> <76ff5ede-99a7-536b-4c26-0db0748ea6e1@2ndQuadrant.com> ! <18157.1508600622@sss.pgh.pa.us> Comments: In-reply-to Michael Paquier message dated "Sun, 22 Oct 2017 01:10:36 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <20565.1508604219.1@sss.pgh.pa.us> Date: Sat, 21 Oct 2017 12:43:39 -0400 Message-ID: <20566.1508604219@sss.pgh.pa.us> List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Michael Paquier writes: > On Sun, Oct 22, 2017 at 12:43 AM, Tom Lane wrote: >> It doesn't seem very nice to have two identical(?) copies of >> extract_variadic_args, especially since the same functionality >> might be of use elsewhere. I'm almost inclined to say that that >> should go in funcapi.c/.h. > More or less identical, the jsonb sibling enforces arguments of type > unknown to text. I was considering first a common place where to put > this stuff and thought about fmgr.c, but this has no dependency on > FunctionCallInfo. I didn't think about this one, still do you think > that's adapted? extract_variadic_args is quite json-ish with its text > enforcement... I don't think collecting all the arguments is particularly special --- format() or concat() for instance could possibly use this. You might need an option to say what to do with unknown. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs