diff options
author | Amit Langote <amitlan@postgresql.org> | 2025-02-19 15:08:17 +0900 |
---|---|---|
committer | Amit Langote <amitlan@postgresql.org> | 2025-02-19 15:08:17 +0900 |
commit | e7563e3c75a83898eff495533b4736093c73778a (patch) | |
tree | eb19838a42f6070e6a6249c9d6f1a7d9e352a620 /doc/src | |
parent | ac0e33136abc4668c9b08e1ba7db69afe1e0e2c3 (diff) | |
download | postgresql-e7563e3c75a83898eff495533b4736093c73778a.tar.gz postgresql-e7563e3c75a83898eff495533b4736093c73778a.zip |
doc: Fix some issues with JSON_TABLE() examples
1. Remove an unused PASSING variable.
2. Adjust formatting of JSON data used in an example to be valid
under strict mode
Reported-by: MiĆosz Chmura <mieszko4@gmail.com>
Author: Robert Treat <rob@xzilla.net>
Discussion: https://postgr.es/m/173859550337.1071.4748984213168572913@wrigleys.postgresql.org
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/func.sgml | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 2548a57df31..df32ee0bf5b 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -19475,7 +19475,7 @@ SELECT jt.* FROM SELECT jt.* FROM my_films, JSON_TABLE (js, '$.favorites[*] ? (@.films[*].director == $filter)' - PASSING 'Alfred Hitchcock' AS filter, 'Vertigo' AS filter2 + PASSING 'Alfred Hitchcock' AS filter COLUMNS ( id FOR ORDINALITY, kind text PATH '$.kind', @@ -19562,13 +19562,13 @@ SELECT jt.* FROM <programlisting> SELECT * FROM JSON_TABLE ( '{"favorites": - {"movies": + [{"movies": [{"name": "One", "director": "John Doe"}, {"name": "Two", "director": "Don Joe"}], "books": [{"name": "Mystery", "authors": [{"name": "Brown Dan"}]}, {"name": "Wonder", "authors": [{"name": "Jun Murakami"}, {"name":"Craig Doe"}]}] -}}'::json, '$.favorites[*]' +}]}'::json, '$.favorites[*]' COLUMNS ( user_id FOR ORDINALITY, NESTED '$.movies[*]' |