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

From: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Missing quotes when deparsing XMLTABLE() and SQL/JSON query functions
Date: 2025-01-11 12:30:38
Message-ID: CAEZATCXTpAS=ncfLNTZ7YS6O5puHeLg_SUYAit+cs7wsrd9Msg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

Attachment Content-Type Size
v1-0001-Fix-XMLTABLE-deparsing-to-quote-namespace-names-i.patch text/x-patch 3.6 KB
v1-0002-Fix-JsonExpr-deparsing-to-quote-variable-names-in.patch text/x-patch 5.5 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2025-01-11 12:51:23 Re: Include patch id in commitfest page
Previous Message Ilia Evdokimov 2025-01-11 11:10:47 Re: explain analyze rows=%.0f