pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedJSON query
3+ messages / 2 participants
[nested] [flat]
* JSON query
@ 2021-10-19 03:45 Scott Ribe <scott_ribe@elevated-dev.com>
0 siblings, 1 reply; 3+ messages in thread
From: Scott Ribe @ 2021-10-19 03:45 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
What's a good way to query jsonb column for
"no keys other than those in this list of keys"
in other words
"containing only keys from this list of keys"
--
Scott Ribe
scott_ribe@elevated-dev.com
https://www.linkedin.com/in/scottribe/
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: JSON query
@ 2021-10-19 04:02 David G. Johnston <david.g.johnston@gmail.com>
parent: Scott Ribe <scott_ribe@elevated-dev.com>
0 siblings, 1 reply; 3+ messages in thread
From: David G. Johnston @ 2021-10-19 04:02 UTC (permalink / raw)
To: Scott Ribe <scott_ribe@elevated-dev.com>; +Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
On Monday, October 18, 2021, Scott Ribe <scott_ribe@elevated-dev.com> wrote:
>
> "containing only keys from this list of keys"
>
>
(jsonb - text[]) = ‘{}’::jsonb …?
Combine with (jsonb ?& text[]) if all tested keys need to be present as
well.
David J.
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: JSON query
@ 2021-10-19 04:27 Scott Ribe <scott_ribe@elevated-dev.com>
parent: David G. Johnston <david.g.johnston@gmail.com>
0 siblings, 0 replies; 3+ messages in thread
From: Scott Ribe @ 2021-10-19 04:27 UTC (permalink / raw)
To: David G. Johnston <david.g.johnston@gmail.com>; +Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
> On Oct 18, 2021, at 10:02 PM, David G. Johnston <david.g.johnston@gmail.com> wrote:
>
> (jsonb - text[]) = ‘{}’::jsonb …?
Aha, thank you!
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2021-10-19 04:27 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-10-19 03:45 JSON query Scott Ribe <scott_ribe@elevated-dev.com>
2021-10-19 04:02 ` David G. Johnston <david.g.johnston@gmail.com>
2021-10-19 04:27 ` Scott Ribe <scott_ribe@elevated-dev.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox