Thread: pgsql: Prevent a rowtype from being included in itself via a range.

pgsql: Prevent a rowtype from being included in itself via a range.

From
Tom Lane
Date:
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_5_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/6609c3ad984bde125ff6ec4e3e056a5b23f68210

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