pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix jsonpath existense checking of missing variables 5+ messages / 1 participants [nested] [flat]
* pgsql: Fix jsonpath existense checking of missing variables @ 2023-01-12 15:23 Alexander Korotkov <akorotkov@postgresql.org> 0 siblings, 0 replies; 5+ messages in thread From: Alexander Korotkov @ 2023-01-12 15:23 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix jsonpath existense checking of missing variables The current jsonpath code assumes that the referenced variable always exists. It could only throw an error at the value valuation time. At the same time existence checking assumes variable is present without valuation, and error suppression doesn't work for missing variables. This commit makes existense checking trigger an error for missing variables. This makes the overall behavior consistent. Backpatch to 12 where jsonpath was introduced. Reported-by: David G. Johnston Discussion: https://postgr.es/m/CAKFQuwbeytffJkVnEqDyLZ%3DrQsznoTh1OgDoOF3VmOMkxcTMjA%40mail.gmail.com Author: Alexander Korotkov, David G. Johnston Backpatch-through: 12 Branch ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/9e24e4781750ca92a0a5ff0aaa8e2091785c3bed Modified Files -------------- src/backend/utils/adt/jsonpath_exec.c | 8 +++++-- src/test/regress/expected/jsonb_jsonpath.out | 32 ++++++++++++++++++++++++++++ src/test/regress/sql/jsonb_jsonpath.sql | 8 +++++++ 3 files changed, 46 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Fix jsonpath existense checking of missing variables @ 2023-01-12 15:26 Alexander Korotkov <akorotkov@postgresql.org> 0 siblings, 0 replies; 5+ messages in thread From: Alexander Korotkov @ 2023-01-12 15:26 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix jsonpath existense checking of missing variables The current jsonpath code assumes that the referenced variable always exists. It could only throw an error at the value valuation time. At the same time existence checking assumes variable is present without valuation, and error suppression doesn't work for missing variables. This commit makes existense checking trigger an error for missing variables. This makes the overall behavior consistent. Backpatch to 12 where jsonpath was introduced. Reported-by: David G. Johnston Discussion: https://postgr.es/m/CAKFQuwbeytffJkVnEqDyLZ%3DrQsznoTh1OgDoOF3VmOMkxcTMjA%40mail.gmail.com Author: Alexander Korotkov, David G. Johnston Backpatch-through: 12 Branch ------ REL_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/4dc3f94fae3de3f19b5c7dd507beac0216b0cde9 Modified Files -------------- src/backend/utils/adt/jsonpath_exec.c | 8 +++++-- src/test/regress/expected/jsonb_jsonpath.out | 32 ++++++++++++++++++++++++++++ src/test/regress/sql/jsonb_jsonpath.sql | 8 +++++++ 3 files changed, 46 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Fix jsonpath existense checking of missing variables @ 2023-01-12 15:26 Alexander Korotkov <akorotkov@postgresql.org> 0 siblings, 0 replies; 5+ messages in thread From: Alexander Korotkov @ 2023-01-12 15:26 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix jsonpath existense checking of missing variables The current jsonpath code assumes that the referenced variable always exists. It could only throw an error at the value valuation time. At the same time existence checking assumes variable is present without valuation, and error suppression doesn't work for missing variables. This commit makes existense checking trigger an error for missing variables. This makes the overall behavior consistent. Backpatch to 12 where jsonpath was introduced. Reported-by: David G. Johnston Discussion: https://postgr.es/m/CAKFQuwbeytffJkVnEqDyLZ%3DrQsznoTh1OgDoOF3VmOMkxcTMjA%40mail.gmail.com Author: Alexander Korotkov, David G. Johnston Backpatch-through: 12 Branch ------ REL_14_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/0d9221f1d251b956a33660bff1420140f8abebcb Modified Files -------------- src/backend/utils/adt/jsonpath_exec.c | 8 +++++-- src/test/regress/expected/jsonb_jsonpath.out | 32 ++++++++++++++++++++++++++++ src/test/regress/sql/jsonb_jsonpath.sql | 8 +++++++ 3 files changed, 46 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Fix jsonpath existense checking of missing variables @ 2023-01-12 15:26 Alexander Korotkov <akorotkov@postgresql.org> 0 siblings, 0 replies; 5+ messages in thread From: Alexander Korotkov @ 2023-01-12 15:26 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix jsonpath existense checking of missing variables The current jsonpath code assumes that the referenced variable always exists. It could only throw an error at the value valuation time. At the same time existence checking assumes variable is present without valuation, and error suppression doesn't work for missing variables. This commit makes existense checking trigger an error for missing variables. This makes the overall behavior consistent. Backpatch to 12 where jsonpath was introduced. Reported-by: David G. Johnston Discussion: https://postgr.es/m/CAKFQuwbeytffJkVnEqDyLZ%3DrQsznoTh1OgDoOF3VmOMkxcTMjA%40mail.gmail.com Author: Alexander Korotkov, David G. Johnston Backpatch-through: 12 Branch ------ REL_13_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/2ff3ac3b5f52a54b829cc7275141839581b568de Modified Files -------------- src/backend/utils/adt/jsonpath_exec.c | 8 +++++-- src/test/regress/expected/jsonb_jsonpath.out | 32 ++++++++++++++++++++++++++++ src/test/regress/sql/jsonb_jsonpath.sql | 8 +++++++ 3 files changed, 46 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
* pgsql: Fix jsonpath existense checking of missing variables @ 2023-01-12 15:30 Alexander Korotkov <akorotkov@postgresql.org> 0 siblings, 0 replies; 5+ messages in thread From: Alexander Korotkov @ 2023-01-12 15:30 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix jsonpath existense checking of missing variables The current jsonpath code assumes that the referenced variable always exists. It could only throw an error at the value valuation time. At the same time existence checking assumes variable is present without valuation, and error suppression doesn't work for missing variables. This commit makes existense checking trigger an error for missing variables. This makes the overall behavior consistent. Backpatch to 12 where jsonpath was introduced. Reported-by: David G. Johnston Discussion: https://postgr.es/m/CAKFQuwbeytffJkVnEqDyLZ%3DrQsznoTh1OgDoOF3VmOMkxcTMjA%40mail.gmail.com Author: Alexander Korotkov, David G. Johnston Backpatch-through: 12 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/3161ae86ce3ced0a91c2d3cdbbdc602d6e19892d Modified Files -------------- src/backend/utils/adt/jsonpath_exec.c | 8 +++++-- src/test/regress/expected/jsonb_jsonpath.out | 32 ++++++++++++++++++++++++++++ src/test/regress/sql/jsonb_jsonpath.sql | 8 +++++++ 3 files changed, 46 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2023-01-12 15:30 UTC | newest] Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2023-01-12 15:23 pgsql: Fix jsonpath existense checking of missing variables Alexander Korotkov <akorotkov@postgresql.org> 2023-01-12 15:26 pgsql: Fix jsonpath existense checking of missing variables Alexander Korotkov <akorotkov@postgresql.org> 2023-01-12 15:26 pgsql: Fix jsonpath existense checking of missing variables Alexander Korotkov <akorotkov@postgresql.org> 2023-01-12 15:26 pgsql: Fix jsonpath existense checking of missing variables Alexander Korotkov <akorotkov@postgresql.org> 2023-01-12 15:30 pgsql: Fix jsonpath existense checking of missing variables Alexander Korotkov <akorotkov@postgresql.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox