Missing quotes when deparsing XMLTABLE() and SQL/JSON query functions
Dean Rasheed <dean.a.rasheed@gmail.com>
From: Dean Rasheed <dean.a.rasheed@gmail.com>
To: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2025-01-11T12:30:38Z
Lists: pgsql-hackers
Attachments
- v1-0001-Fix-XMLTABLE-deparsing-to-quote-namespace-names-i.patch (text/x-patch) patch v1-0001
- v1-0002-Fix-JsonExpr-deparsing-to-quote-variable-names-in.patch (text/x-patch) patch v1-0002
While looking over ruleutils.c, I noticed a couple of places that fail to properly quote certain outputs: 1. XML namespace names in XMLTABLE(). 2. variable names in the PASSING clause of the SQL/JSON query functions JSON_EXISTS(), JSON_QUERY(), and JSON_VALUE() (but not JSON_TABLE(), which has similar code that does quote variable names properly). I scanned the rest of ruleutils.c, and didn't find any other issues. Regards, Dean
Commits
-
Fix JsonExpr deparsing to quote variable names in the PASSING clause.
- d037cc2af14a 17.3 landed
- a93e2a1e25a6 18.0 landed
-
Fix XMLTABLE() deparsing to quote namespace names if necessary.
- 8f137f0382b1 13.19 landed
- dc8cd9cd0198 14.16 landed
- 7c0379516f36 15.11 landed
- 77763f3bef48 16.7 landed
- 61b12135f5b7 17.3 landed
- d673eefd410c 18.0 landed