Re: Missing quotes when deparsing XMLTABLE() and SQL/JSON query functions

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Dean Rasheed <dean.a.rasheed@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2025-01-11T15:42:34Z
Lists: pgsql-hackers
Dean Rasheed <dean.a.rasheed@gmail.com> writes:
> While looking over ruleutils.c, I noticed a couple of places that fail
> to properly quote certain outputs:

> 1. XML namespace names in XMLTABLE().

+1, but you also need to update the xml_1.out and xml_2.out files.
IIRC, xml_1.out is what comes out without --with-libxml.
I forget what's different about xml_2.out, but you can probably
just clone the diff for xml.out and be fine.

			regards, tom lane



Commits

  1. Fix JsonExpr deparsing to quote variable names in the PASSING clause.

  2. Fix XMLTABLE() deparsing to quote namespace names if necessary.