Re: Weird special case in jsonb_concat() - Mailing list pgsql-hackers

From Zhihong Yu
Subject Re: Weird special case in jsonb_concat()
Date
Msg-id CALNJ-vSWUjf0bWRrrRQrPJewWj1ax-JUMCErD0MjFhO8DWpmyg@mail.gmail.com
Whole thread Raw
In response to Weird special case in jsonb_concat()  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Improving LWLock wait events
Next
From: Masahiko Sawada
Date:
Subject: Re: Commit fest manager for 2021-01