pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Paquier <michael.paquier@gmail.com>
Cc: Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
Cc: Dmitry Dolgov <9erthalion6@gmail.com>
Cc: Marko Tiikkaja <marko@joh.to>
Cc: PostgreSQL mailing lists <pgsql-bugs@postgresql.org>
Subject: Re: BUG #14849: jsonb_build_object doesn't like VARIADIC calls very much
Date: Sat, 21 Oct 2017 12:43:39 -0400
Message-ID: <20566.1508604219@sss.pgh.pa.us> (raw)
In-Reply-To: <CAB7nPqTy_+gQ1e1++UxezR+41OkPoo-sPBfUj=QCLoBZqpSwfg@mail.gmail.com>
References: <20171011020058.27986.42308@wrigleys.postgresql.org>
	<76ff5ede-99a7-536b-4c26-0db0748ea6e1@2ndQuadrant.com>
	<CAB7nPqTP9B_FLDGL=dPx5iGqKTJSENfvD=PoOy=zzC1AmmM55A@mail.gmail.com>
	<CA+q6zcU=6CcmdAdW=J9o-ukmyKYLLL=6-cHYPZNLN5JQr4wRRw@mail.gmail.com>
	<CAB7nPqTppc5w2nX7jaSu94V+VHfThbvRq12hmLrSiiN6ii1spA@mail.gmail.com>
	<CAB7nPqRDvken_V70kGXX3=9w4D9zM9-jj2gfg6pMyjpRzaSvPQ@mail.gmail.com>
	<CA+q6zcUyiqG8HezQT2U+78udtMPeOFiXD9dRmT5saYtESckOpw@mail.gmail.com>
	<CAB7nPqTsuq=rnM8PQGxNS3Gh=JQQp4RmdPxGLGXSV648X4yfhA@mail.gmail.com>
	<CA+q6zcWNs_j5pd_+j6JbFXe7M=n9NX8h0Emb1pux7Ap=w=DWrA@mail.gmail.com>
	<CAB7nPqTh-Oo-FxurwDq6V8sfR2yNc-2PE7CB4RrnM8ewwS8Z9A@mail.gmail.com>
	<CA+q6zcWc=yE8XkOK+w58+sW_K+crFU-Xa48UKh5R0PFDEi6uEg@mail.gmail.com>
	<dbde1be7-d9d7-0951-f976-b8118da66199@2ndQuadrant.com>
	<CAB7nPqSr+3jHmoQvTX=MNeWMC0OTKf+tdn6uL9rgs1x4qgs22g@mail.gmail.com>
	<d06b1301-107a-016b-0139-93aeeacd51e4@2ndQuadrant.com>
	<CAB7nPqSf0jMiCpJcsQSg6s3xLiLry3WaqeKOviYA7XfFu6QCzQ@mail.gmail.com>
	<b7fcae21-7227-806c-5441-9470db9da608@2ndQuadrant.com>
	<CAB7nPqRkQ9YCiXfT3Ucn7XUx_yfmAsRTKxewfPGbaS1GczLnbw@mail.gmail.com>
	<18157.1508600622@sss.pgh.pa.us>
	<CAB7nPqTy_+gQ1e1++UxezR+41OkPoo-sPBfUj=QCLoBZqpSwfg@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

Michael Paquier <michael.paquier@gmail.com> writes:
> On Sun, Oct 22, 2017 at 12:43 AM, Tom Lane <tgl@sss.pgh.pa.us> 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



view thread (33+ messages)  latest in thread

Message-ID: <20566.1508604219@sss.pgh.pa.us>
Permalink:  ../20566.1508604219@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/20566.1508604219@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, michael.paquier@gmail.com, andrew.dunstan@2ndquadrant.com, 9erthalion6@gmail.com, marko@joh.to
  Subject: Re: BUG #14849: jsonb_build_object doesn't like VARIADIC calls very much
  In-Reply-To: <20566.1508604219@sss.pgh.pa.us>
  References: <20171011020058.27986.42308@wrigleys.postgresql.org> <CAB7nPqRDvken_V70kGXX3=9w4D9zM9-jj2gfg6pMyjpRzaSvPQ@mail.gmail.com> <CA+q6zcUyiqG8HezQT2U+78udtMPeOFiXD9dRmT5saYtESckOpw@mail.gmail.com> <CAB7nPqTsuq=rnM8PQGxNS3Gh=JQQp4RmdPxGLGXSV648X4yfhA@mail.gmail.com> <CA+q6zcWNs_j5pd_+j6JbFXe7M=n9NX8h0Emb1pux7Ap=w=DWrA@mail.gmail.com> <CAB7nPqTh-Oo-FxurwDq6V8sfR2yNc-2PE7CB4RrnM8ewwS8Z9A@mail.gmail.com> <CA+q6zcWc=yE8XkOK+w58+sW_K+crFU-Xa48UKh5R0PFDEi6uEg@mail.gmail.com> <dbde1be7-d9d7-0951-f976-b8118da66199@2ndQuadrant.com> <CAB7nPqSr+3jHmoQvTX=MNeWMC0OTKf+tdn6uL9rgs1x4qgs22g@mail.gmail.com> <d06b1301-107a-016b-0139-93aeeacd51e4@2ndQuadrant.com> <CAB7nPqSf0jMiCpJcsQSg6s3xLiLry3WaqeKOviYA7XfFu6QCzQ@mail.gmail.com> <b7fcae21-7227-806c-5441-9470db9da608@2ndQuadrant.com> <CAB7nPqRkQ9YCiXfT3Ucn7XUx_yfmAsRTKxewfPGbaS1GczLnbw@mail.gmail.com> <18157.1508600622@sss.pgh.pa.us> <CAB7nPqTy_+gQ1e1++UxezR+41OkPoo-sPBfUj=QCLoBZqpSwfg@mail.gmail.com> <20566.1508604219@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox