Skip to content

Commit 77cdee9

Browse files
committed
doc: Fix some issues with JSON_TABLE() exampls
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 7edd2cb commit 77cdee9

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
@@ -19308,7 +19308,7 @@ SELECT jt.* FROM
1930819308
SELECT jt.* FROM
1930919309
my_films,
1931019310
JSON_TABLE (js, '$.favorites[*] ? (@.films[*].director == $filter)'
19311-
PASSING 'Alfred Hitchcock' AS filter, 'Vertigo' AS filter2
19311+
PASSING 'Alfred Hitchcock' AS filter
1931219312
COLUMNS (
1931319313
id FOR ORDINALITY,
1931419314
kind text PATH '$.kind',
@@ -19395,13 +19395,13 @@ SELECT jt.* FROM
1939519395
<programlisting>
1939619396
SELECT * FROM JSON_TABLE (
1939719397
'{"favorites":
19398-
{"movies":
19398+
[{"movies":
1939919399
[{"name": "One", "director": "John Doe"},
1940019400
{"name": "Two", "director": "Don Joe"}],
1940119401
"books":
1940219402
[{"name": "Mystery", "authors": [{"name": "Brown Dan"}]},
1940319403
{"name": "Wonder", "authors": [{"name": "Jun Murakami"}, {"name":"Craig Doe"}]}]
19404-
}}'::json, '$.favorites[*]'
19404+
}]}'::json, '$.favorites[*]'
1940519405
COLUMNS (
1940619406
user_id FOR ORDINALITY,
1940719407
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