Skip to content

Commit e7563e3

Browse files
committed
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
1 parent ac0e331 commit e7563e3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

doc/src/sgml/func.sgml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19475,7 +19475,7 @@ SELECT jt.* FROM
1947519475
SELECT jt.* FROM
1947619476
my_films,
1947719477
JSON_TABLE (js, '$.favorites[*] ? (@.films[*].director == $filter)'
19478-
PASSING 'Alfred Hitchcock' AS filter, 'Vertigo' AS filter2
19478+
PASSING 'Alfred Hitchcock' AS filter
1947919479
COLUMNS (
1948019480
id FOR ORDINALITY,
1948119481
kind text PATH '$.kind',
@@ -19562,13 +19562,13 @@ SELECT jt.* FROM
1956219562
<programlisting>
1956319563
SELECT * FROM JSON_TABLE (
1956419564
'{"favorites":
19565-
{"movies":
19565+
[{"movies":
1956619566
[{"name": "One", "director": "John Doe"},
1956719567
{"name": "Two", "director": "Don Joe"}],
1956819568
"books":
1956919569
[{"name": "Mystery", "authors": [{"name": "Brown Dan"}]},
1957019570
{"name": "Wonder", "authors": [{"name": "Jun Murakami"}, {"name":"Craig Doe"}]}]
19571-
}}'::json, '$.favorites[*]'
19571+
}]}'::json, '$.favorites[*]'
1957219572
COLUMNS (
1957319573
user_id FOR ORDINALITY,
1957419574
NESTED '$.movies[*]'

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy