agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
pgsql: Don't allow composite type to be member of itself via multirange
6+ messages / 1 participants
[nested] [flat]

* pgsql: Don't allow composite type to be member of itself via multirange
@ 2026-04-23 18:48  Heikki Linnakangas <heikki.linnakangas@iki.fi>
  0 siblings, 0 replies; 6+ messages in thread

From: Heikki Linnakangas @ 2026-04-23 18:48 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Don't allow composite type to be member of itself via multirange

CheckAttributeType() checks that a composite type is not made a member
of itself with ALTER TABLE ADD COLUMN or ALTER TYPE ADD ATTRIBUTE,
even indirectly via a domain, array, another composite type or a range
type. But it missed checking for multiranges. That was a simple
oversight when multiranges were added.

Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Discussion: https://www.postgresql.org/message-id/93ce56cd-02a6-4db1-8224-c8999372facc@iki.fi
Backpatch-through: 14

Branch
------
REL_17_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/54343f6f9046caa31c71a72479fd567322d72591

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



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

* pgsql: Don't allow composite type to be member of itself via multirange
@ 2026-04-23 18:48  Heikki Linnakangas <heikki.linnakangas@iki.fi>
  0 siblings, 0 replies; 6+ messages in thread

From: Heikki Linnakangas @ 2026-04-23 18:48 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Don't allow composite type to be member of itself via multirange

CheckAttributeType() checks that a composite type is not made a member
of itself with ALTER TABLE ADD COLUMN or ALTER TYPE ADD ATTRIBUTE,
even indirectly via a domain, array, another composite type or a range
type. But it missed checking for multiranges. That was a simple
oversight when multiranges were added.

Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Discussion: https://www.postgresql.org/message-id/93ce56cd-02a6-4db1-8224-c8999372facc@iki.fi
Backpatch-through: 14

Branch
------
REL_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/34ebeb15c8b18330d992bc672c1192b0d9436fc7

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



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

* pgsql: Don't allow composite type to be member of itself via multirange
@ 2026-04-23 18:48  Heikki Linnakangas <heikki.linnakangas@iki.fi>
  0 siblings, 0 replies; 6+ messages in thread

From: Heikki Linnakangas @ 2026-04-23 18:48 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Don't allow composite type to be member of itself via multirange

CheckAttributeType() checks that a composite type is not made a member
of itself with ALTER TABLE ADD COLUMN or ALTER TYPE ADD ATTRIBUTE,
even indirectly via a domain, array, another composite type or a range
type. But it missed checking for multiranges. That was a simple
oversight when multiranges were added.

Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Discussion: https://www.postgresql.org/message-id/93ce56cd-02a6-4db1-8224-c8999372facc@iki.fi
Backpatch-through: 14

Branch
------
master

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

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



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

* pgsql: Don't allow composite type to be member of itself via multirange
@ 2026-04-23 18:48  Heikki Linnakangas <heikki.linnakangas@iki.fi>
  0 siblings, 0 replies; 6+ messages in thread

From: Heikki Linnakangas @ 2026-04-23 18:48 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Don't allow composite type to be member of itself via multirange

CheckAttributeType() checks that a composite type is not made a member
of itself with ALTER TABLE ADD COLUMN or ALTER TYPE ADD ATTRIBUTE,
even indirectly via a domain, array, another composite type or a range
type. But it missed checking for multiranges. That was a simple
oversight when multiranges were added.

Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Discussion: https://www.postgresql.org/message-id/93ce56cd-02a6-4db1-8224-c8999372facc@iki.fi
Backpatch-through: 14

Branch
------
REL_16_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/06e304524d5c19223697a78ffaa8c7610bc6a365

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



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

* pgsql: Don't allow composite type to be member of itself via multirange
@ 2026-04-23 18:48  Heikki Linnakangas <heikki.linnakangas@iki.fi>
  0 siblings, 0 replies; 6+ messages in thread

From: Heikki Linnakangas @ 2026-04-23 18:48 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Don't allow composite type to be member of itself via multirange

CheckAttributeType() checks that a composite type is not made a member
of itself with ALTER TABLE ADD COLUMN or ALTER TYPE ADD ATTRIBUTE,
even indirectly via a domain, array, another composite type or a range
type. But it missed checking for multiranges. That was a simple
oversight when multiranges were added.

Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Discussion: https://www.postgresql.org/message-id/93ce56cd-02a6-4db1-8224-c8999372facc@iki.fi
Backpatch-through: 14

Branch
------
REL_18_STABLE

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

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



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

* pgsql: Don't allow composite type to be member of itself via multirange
@ 2026-04-23 18:48  Heikki Linnakangas <heikki.linnakangas@iki.fi>
  0 siblings, 0 replies; 6+ messages in thread

From: Heikki Linnakangas @ 2026-04-23 18:48 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Don't allow composite type to be member of itself via multirange

CheckAttributeType() checks that a composite type is not made a member
of itself with ALTER TABLE ADD COLUMN or ALTER TYPE ADD ATTRIBUTE,
even indirectly via a domain, array, another composite type or a range
type. But it missed checking for multiranges. That was a simple
oversight when multiranges were added.

Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Discussion: https://www.postgresql.org/message-id/93ce56cd-02a6-4db1-8224-c8999372facc@iki.fi
Backpatch-through: 14

Branch
------
REL_14_STABLE

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

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



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


end of thread, other threads:[~2026-04-23 18:48 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-04-23 18:48 pgsql: Don't allow composite type to be member of itself via multirange Heikki Linnakangas <heikki.linnakangas@iki.fi>
2026-04-23 18:48 pgsql: Don't allow composite type to be member of itself via multirange Heikki Linnakangas <heikki.linnakangas@iki.fi>
2026-04-23 18:48 pgsql: Don't allow composite type to be member of itself via multirange Heikki Linnakangas <heikki.linnakangas@iki.fi>
2026-04-23 18:48 pgsql: Don't allow composite type to be member of itself via multirange Heikki Linnakangas <heikki.linnakangas@iki.fi>
2026-04-23 18:48 pgsql: Don't allow composite type to be member of itself via multirange Heikki Linnakangas <heikki.linnakangas@iki.fi>
2026-04-23 18:48 pgsql: Don't allow composite type to be member of itself via multirange Heikki Linnakangas <heikki.linnakangas@iki.fi>

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