pgsql: Prevent a rowtype from being included in itself via a range. - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Prevent a rowtype from being included in itself via a range.
Date
Msg-id E1ijRCS-0004Ww-D2@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Prevent a rowtype from being included in itself via a range.

We probably should have thought of this case when ranges were added,
but we didn't.  (It's not the fault of commit eb51af71f, because
ranges didn't exist then.)

It's an old bug, so back-patch to all supported branches.

Discussion: https://postgr.es/m/7782.1577051475@sss.pgh.pa.us

Branch
------
REL9_4_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/0d245d13c643d9ee089ad59fc4673a6b520461b1

Modified Files
--------------
src/backend/catalog/heap.c               |  9 +++++++++
src/test/regress/expected/rangetypes.out | 19 +++++++++++++++++++
src/test/regress/sql/rangetypes.sql      | 16 ++++++++++++++++
3 files changed, 44 insertions(+)


pgsql-committers by date:

Previous
From: Alvaro Herrera
Date:
Subject: pgsql: GetPublicationByName: Don't repeat ourselves
Next
From: Tom Lane
Date:
Subject: pgsql: Disallow partition key expressions that return pseudo-types.