From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Include TableFunc references when computing expression dependenc |
Date: | 2019-11-13 17:12:01 |
Message-ID: | E1iUwBV-0002ic-6K@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Include TableFunc references when computing expression dependencies.
The TableFunc node (i.e., XMLTABLE) includes type and collation OIDs
that might not be referenced anywhere else in the expression tree,
so they need to be accounted for when extracting dependencies.
Fortunately, the practical effects of this are limited, since
(a) it's somewhat unlikely that people would be extracting
columns of non-builtin types from an XML document, and (b)
in many scenarios, the query would contain other references
to such types, or functions depending on them. However, it's
not hard to construct examples wherein the existing code lets
one drop a type used in XMLTABLE and thereby break a view.
This is evidently an original oversight in the XMLTABLE patch,
so back-patch to v10 where that came in.
Discussion: https://postgr.es/m/18427.1573508501@sss.pgh.pa.us
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/2c7b5dad6eb1602839e5961b4d4eb6494fe4a1ee
Modified Files
--------------
src/backend/catalog/dependency.c | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2019-11-13 18:41:21 | pgsql: Avoid downcasing/truncation of RADIUS authentication parameters. |
Previous Message | Tom Lane | 2019-11-13 16:36:05 | pgsql: Handle arrays and ranges in pg_upgrade's test for non-upgradable |