mirror of
https://git.postgresql.org/git/postgresql.git
synced 2026-02-20 13:27:00 +08:00
SQL/JSON: Prevent ON EMPTY for EXISTS columns in JSON_TABLE()
Due to an oversight in de3600452b61, the ON EMPTY clause was incorrectly allowed in the EXISTS column. Fix the grammar to prevent this. Discussion: https://postgr.es/m/CA%2BHiwqHh3YDXTpccgAo4CdfV9Mhy%2Bmg%3Doh6t8rfM5uLW1BJN4g%40mail.gmail.com
This commit is contained in:
@ -518,3 +518,6 @@ SELECT sub.* FROM s,
|
||||
\sv jsonb_table_view7
|
||||
DROP VIEW jsonb_table_view7;
|
||||
DROP TABLE s;
|
||||
|
||||
-- Prevent ON EMPTY specification on EXISTS columns
|
||||
SELECT * FROM JSON_TABLE(jsonb '1', '$' COLUMNS (a int exists empty object on empty));
|
||||
|
||||
Reference in New Issue
Block a user