public inbox for [email protected]  
help / color / mirror / Atom feed
From: Marcos Pegoraro <[email protected]>
To: pgsql-hackers <[email protected]>
Subject: Missing jsonb_ ... functions on DOCs
Date: Sun, 10 May 2026 13:49:51 -0300
Message-ID: <CAB-JLwbPuNY+4Ez48TZpXg-ZuxRSJ_igsNOa-nX7jBEs97qHCQ@mail.gmail.com> (raw)

None of these functions are documented, Is this intentional ?
If not, how can these functions be there ?
An additional table right after operators ?
Just a comment on the correspondent operator ?

-- jsonb_exists - corresponds to ? operator
select jsonb_exists('{"a":null, "b":"qq"}', 'a');
select '{"a":null, "b":"qq"}'::jsonb ? 'a';

-- jsonb_exists_any - corresponds to ?| operator
select jsonb_exists_any('{"a":null, "b":"qq"}', ARRAY['a','c']);
select '{"a":null, "b":"qq"}'::jsonb ?| ARRAY['a','c'];

-- jsonb_exists_all - corresponds to ?& operator
select jsonb_exists_all('{"a":null, "b":"qq"}', ARRAY['a','b']);
select '{"a":null, "b":"qq"}'::jsonb ?& ARRAY['a','b'];

-- jsonb_contains - corresponds to @> operator
select jsonb_contains('{"a":null, "b":"qq"}', '{"b":"qq"}');
select '{"a":null, "b":"qq"}'::jsonb @> '{"b":"qq"}';

-- jsonb_contained - corresponds to <@ operator
select jsonb_contained('{"b":"qq"}','{"a":null, "b":"qq"}');
select '{"b":"qq"}' <@ '{"a":null, "b":"qq"}'::jsonb;

-- jsonb_concat - corresponds to || operator
select jsonb_concat('{"b":"qq"}','{"a":null}');
select '{"b":"qq"}'::jsonb || '{"a":null}'::jsonb;

-- jsonb_delete - corresponds to - operator
select jsonb_delete('{"b":"qq", "a":null}','b');
select '{"b":"qq", "a":null}'::jsonb - 'b'

-- jsonb_delete_path - corresponds to #- operator
select jsonb_delete_path('{"a":1, "b": {"c": 5, "d":3}}'::jsonb, '{b,c}');
select '{"a":1, "b": {"c": 5, "d":3}}'::jsonb #- '{b,c}';

regards
Marcos


view thread (6+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected]
  Subject: Re: Missing jsonb_ ... functions on DOCs
  In-Reply-To: <CAB-JLwbPuNY+4Ez48TZpXg-ZuxRSJ_igsNOa-nX7jBEs97qHCQ@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox