pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Include TableFunc references when computing expression dependenc
4+ messages / 1 participants
[nested] [flat]

* pgsql: Include TableFunc references when computing expression dependenc
@ 2019-11-13 17:12  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 4+ messages in thread

From: Tom Lane @ 2019-11-13 17:12 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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(+)



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* pgsql: Include TableFunc references when computing expression dependenc
@ 2019-11-13 17:12  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 4+ messages in thread

From: Tom Lane @ 2019-11-13 17:12 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/eec569fac7a5cae17670f777c5a31054bf89ecfb

Modified Files
--------------
src/backend/catalog/dependency.c | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* pgsql: Include TableFunc references when computing expression dependenc
@ 2019-11-13 17:12  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 4+ messages in thread

From: Tom Lane @ 2019-11-13 17:12 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/94a9cb43ff5a84b25a3e7d5226c8e02d55fe69c3

Modified Files
--------------
src/backend/catalog/dependency.c | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* pgsql: Include TableFunc references when computing expression dependenc
@ 2019-11-13 17:12  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 4+ messages in thread

From: Tom Lane @ 2019-11-13 17:12 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/e25c4b3b2f678dd4fad142e494a44a59a7748904

Modified Files
--------------
src/backend/catalog/dependency.c | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)



^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2019-11-13 17:12 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-11-13 17:12 pgsql: Include TableFunc references when computing expression dependenc Tom Lane <tgl@sss.pgh.pa.us>
2019-11-13 17:12 pgsql: Include TableFunc references when computing expression dependenc Tom Lane <tgl@sss.pgh.pa.us>
2019-11-13 17:12 pgsql: Include TableFunc references when computing expression dependenc Tom Lane <tgl@sss.pgh.pa.us>
2019-11-13 17:12 pgsql: Include TableFunc references when computing expression dependenc Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox