Prevent a rowtype from being included in itself via a range.
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 23 Dec 2019 17:08:23 +0000 (12:08 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 23 Dec 2019 17:08:23 +0000 (12:08 -0500)
commitfc7695891d357a54f0258142de85f88520796b9b
treeee9cdf7330ed644d581dda10844912a0aeaa65c0
parent0fd8cfb20d2d41d4c2df021a5f355965fd8d21bc
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
src/backend/catalog/heap.c
src/test/regress/expected/rangetypes.out
src/test/regress/sql/rangetypes.sql