Re: jsonb_object() seems to be buggy. jsonb_build_object() is good.

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Bryn Llewellyn <bryn(at)yugabyte(dot)com>
Cc: Vik Fearing <vik(at)postgresfriends(dot)org>, pgsql-hackers list <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: jsonb_object() seems to be buggy. jsonb_build_object() is good.
Date: 2020-02-15 03:19:40
Message-ID: CAKFQuwa97NgrVKPdLZMKAffZyit-bZ+YrdhwTUMz3im8Spmi5w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Friday, February 14, 2020, Bryn Llewellyn <bryn(at)yugabyte(dot)com> wrote:
>
> The doc (“Builds a JSON object out of a text array.”) is simply too terse
> to inform an answer to this question.
>

It does presume knowledge but it precisely defines the outcome:

PostgreSQL arrays are typed and all members are of the same type. A text
array’s members are all text.

Given the above knowledge the fact that the resultant json object contains
exclusively text keys and text values directly follows.

David J.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message David G. Johnston 2020-02-15 03:24:58 Re: jsonb_object() seems to be buggy. jsonb_build_object() is good.
Previous Message Vik Fearing 2020-02-15 03:12:43 Re: jsonb_object() seems to be buggy. jsonb_build_object() is good.