Re: Weird special case in jsonb_concat()

From: Zhihong Yu <zyu(at)yugabyte(dot)com>
To: PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Weird special case in jsonb_concat()
Date: 2020-12-20 21:48:39
Message-ID: CALNJ-vSWUjf0bWRrrRQrPJewWj1ax-JUMCErD0MjFhO8DWpmyg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,
w.r.t. the patch,

+select '[3]'::jsonb || '{}'::jsonb;
+ ?column?
+----------
+ [3, {}]
+(1 row)
+
+select '3'::jsonb || '[]'::jsonb;

Should cases where the empty array precedes non-empty jsonb be added ?

select '[]'::jsonb || '3'::jsonb;
select '{}'::jsonb || '[3]'::jsonb;

Cheers

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2020-12-20 21:57:03 Re: Commit fest manager for 2021-01
Previous Message Andres Freund 2020-12-20 21:38:41 Re: optimizer/clauses.h needn't include access/htup.h