[BUGS] BUG #14849: jsonb_build_object doesn't like VARIADIC calls very much - Mailing list pgsql-bugs

From marko@joh.to
Subject [BUGS] BUG #14849: jsonb_build_object doesn't like VARIADIC calls very much
Date
Msg-id 20171011020058.27986.42308@wrigleys.postgresql.org
Whole thread Raw
Responses Re: [BUGS] BUG #14849: jsonb_build_object doesn't like VARIADIC callsvery much
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      14849
Logged by:          Marko Tiikkaja
Email address:      marko@joh.to
PostgreSQL version: 10.0
Operating system:   Linux
Description:

Hi,

This query fails with an unreasonable error message:
 =# SELECT jsonb_build_object(VARIADIC '{a,b}'::text[]); ERROR:  invalid number of arguments: object must be matched
keyvalue 
pairs

jsonb_object(text[]) can be used instead in this case, so perhaps
jsonb_build_object() could simply point to that one if a variadic call like
this is made?


--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: [BUGS] BUG #14830: Missed NOTIFications, PostgreSQL 9.1.24
Next
From: Lukas Eder
Date:
Subject: [BUGS] Combination of ordered-set aggregate function terminates JDBCconnection on PostgreSQL 9.6.5