pgsql: SQL/JSON: Correctly enforce the default ON EMPTY behavior

2024-06-19 Thread Amit Langote
SQL/JSON: Correctly enforce the default ON EMPTY behavior Currently, when the ON EMPTY clause is not present, the ON ERROR clause (implicit or explicit) dictates the behavior when jsonpath evaluation in ExecEvalJsonExprPath() results in an empty sequence. That is an oversight in the commit 6185c97

pgsql: SQL/JSON: Correct jsonpath variable name matching

2024-06-19 Thread Amit Langote
SQL/JSON: Correct jsonpath variable name matching Previously, GetJsonPathVar() allowed a jsonpath expression to reference any prefix of a PASSING variable's name. For example, the following query would incorrectly work: SELECT JSON_QUERY(context_item, jsonpath '$xy' PASSING val AS xyz); The fix

pgsql: Fix comment in pg_upgrade.h.

2024-06-19 Thread Nathan Bossart
Fix comment in pg_upgrade.h. Contrary to what the comment for the "check" struct member claims, 'pg_upgrade --check' performs only the checks and does not ask the user for permission to make changes. Reviewed-by: Daniel Gustafsson Discussion: https://postgr.es/m/ZnHk7ci5IuTWVc_c%40nathan Branch