mirror of
https://github.com/zebrajr/postgres.git
synced 2025-12-08 07:38:44 +01:00
This feature allows jsonb data to be treated as a table and thus used in a FROM clause like other tabular data. Data can be selected from the jsonb using jsonpath expressions, and hoisted out of nested structures in the jsonb to form multiple rows, more or less like an outer join. Nikita Glukhov Reviewers have included (in no particular order) Andres Freund, Alexander Korotkov, Pavel Stehule, Andrew Alsup, Erik Rijkers, Zhihong Yu (whose name I previously misspelled), Himanshu Upadhyaya, Daniel Gustafsson, Justin Pryzby. Discussion: https://postgr.es/m/7e2cb85d-24cf-4abb-30a5-1a33715959bd@postgrespro.ru
16 lines
259 B
SQL
16 lines
259 B
SQL
-- JSON_EXISTS
|
|
|
|
SELECT JSON_EXISTS(NULL FORMAT JSON, '$');
|
|
|
|
-- JSON_VALUE
|
|
|
|
SELECT JSON_VALUE(NULL FORMAT JSON, '$');
|
|
|
|
-- JSON_QUERY
|
|
|
|
SELECT JSON_QUERY(NULL FORMAT JSON, '$');
|
|
|
|
-- JSON_TABLE
|
|
|
|
SELECT * FROM JSON_TABLE(NULL FORMAT JSON, '$' COLUMNS (foo text));
|