Re: BUG #14849: jsonb_build_object doesn't like VARIADIC calls very much

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com>, Dmitry Dolgov <9erthalion6(at)gmail(dot)com>, Marko Tiikkaja <marko(at)joh(dot)to>, PostgreSQL mailing lists <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #14849: jsonb_build_object doesn't like VARIADIC calls very much
Date: 2017-10-21 16:10:36
Message-ID: CAB7nPqTy_+gQ1e1++UxezR+41OkPoo-sPBfUj=QCLoBZqpSwfg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

On Sun, Oct 22, 2017 at 12:43 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Michael Paquier <michael(dot)paquier(at)gmail(dot)com> writes:
>> Here you go, down to 9.4 where things apply. The same patch can be
>> applied for HEAD/10, 9.5/9.6 and 9.4. The 9.4 version just needs to
>> have the portion for json as the jsonb functions have been added in
>> 9.5, and the json functions are new as of 9.4.
>
> 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...
--
Michael

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2017-10-21 16:43:39 Re: BUG #14849: jsonb_build_object doesn't like VARIADIC calls very much
Previous Message Tom Lane 2017-10-21 15:43:42 Re: BUG #14849: jsonb_build_object doesn't like VARIADIC calls very much

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2017-10-21 16:43:39 Re: BUG #14849: jsonb_build_object doesn't like VARIADIC calls very much
Previous Message Robert Haas 2017-10-21 16:09:33 Re: Block level parallel vacuum WIP