pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Prevent a rowtype from being included in itself.
11+ messages / 1 participants
[nested] [flat]

* pgsql: Prevent a rowtype from being included in itself.
@ 2011-03-28 19:46 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 11+ messages in thread

From: Tom Lane @ 2011-03-28 19:46 UTC (permalink / raw)
  To: pgsql-committers

Prevent a rowtype from being included in itself.

Eventually we might be able to allow that, but it's not clear how many
places need to be fixed to prevent infinite recursion when there's a direct
or indirect inclusion of a rowtype in itself.  One such place is
CheckAttributeType(), which will recurse to stack overflow in cases such as
those exhibited in bug #5950 from Alex Perepelica.  If we were sure it was
the only such place, we could easily modify the code added by this patch to
stop the recursion without a complaint ... but it probably isn't the only
such place.  Hence, throw error until such time as someone is excited
enough about this type of usage to put work into making it safe.

Back-patch as far as 8.3.  8.2 doesn't have the recursive call in
CheckAttributeType in the first place, so I see no need to add code there
in the absence of clear evidence of a problem elsewhere.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/eb51af71f241e8cb199790dee9ad246bb36b3287

Modified Files
--------------
src/backend/catalog/heap.c                |   49 +++++++++++++++++++++++++---
src/backend/catalog/index.c               |    4 ++-
src/backend/commands/tablecmds.c          |    8 +++-
src/include/catalog/heap.h                |    4 ++-
src/test/regress/expected/alter_table.out |   12 +++++++
src/test/regress/sql/alter_table.sql      |    9 +++++
6 files changed, 76 insertions(+), 10 deletions(-)



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

* pgsql: Prevent a rowtype from being included in itself.
@ 2011-03-28 19:46 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 11+ messages in thread

From: Tom Lane @ 2011-03-28 19:46 UTC (permalink / raw)
  To: pgsql-committers

Prevent a rowtype from being included in itself.

Eventually we might be able to allow that, but it's not clear how many
places need to be fixed to prevent infinite recursion when there's a direct
or indirect inclusion of a rowtype in itself.  One such place is
CheckAttributeType(), which will recurse to stack overflow in cases such as
those exhibited in bug #5950 from Alex Perepelica.  If we were sure it was
the only such place, we could easily modify the code added by this patch to
stop the recursion without a complaint ... but it probably isn't the only
such place.  Hence, throw error until such time as someone is excited
enough about this type of usage to put work into making it safe.

Back-patch as far as 8.3.  8.2 doesn't have the recursive call in
CheckAttributeType in the first place, so I see no need to add code there
in the absence of clear evidence of a problem elsewhere.

Branch
------
REL9_0_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/ce3b0ab0c327b2e3efa44342ad8de3256806cf84

Modified Files
--------------
src/backend/catalog/heap.c                |   38 ++++++++++++++++++++++++++++-
src/backend/catalog/index.c               |    3 +-
src/backend/commands/tablecmds.c          |    8 ++++-
src/include/catalog/heap.h                |    1 +
src/test/regress/expected/alter_table.out |   12 +++++++++
src/test/regress/sql/alter_table.sql      |    9 +++++++
6 files changed, 67 insertions(+), 4 deletions(-)



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

* pgsql: Prevent a rowtype from being included in itself.
@ 2011-03-28 19:46 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 11+ messages in thread

From: Tom Lane @ 2011-03-28 19:46 UTC (permalink / raw)
  To: pgsql-committers

Prevent a rowtype from being included in itself.

Eventually we might be able to allow that, but it's not clear how many
places need to be fixed to prevent infinite recursion when there's a direct
or indirect inclusion of a rowtype in itself.  One such place is
CheckAttributeType(), which will recurse to stack overflow in cases such as
those exhibited in bug #5950 from Alex Perepelica.  If we were sure it was
the only such place, we could easily modify the code added by this patch to
stop the recursion without a complaint ... but it probably isn't the only
such place.  Hence, throw error until such time as someone is excited
enough about this type of usage to put work into making it safe.

Back-patch as far as 8.3.  8.2 doesn't have the recursive call in
CheckAttributeType in the first place, so I see no need to add code there
in the absence of clear evidence of a problem elsewhere.

Branch
------
REL8_4_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/fca20bcec9f4cae358044bdc66ebcb88c07c5ac2

Modified Files
--------------
src/backend/catalog/heap.c                |   43 ++++++++++++++++++++++++++---
src/backend/catalog/index.c               |    2 +-
src/backend/commands/tablecmds.c          |    6 +++-
src/include/catalog/heap.h                |    3 +-
src/test/regress/expected/alter_table.out |   12 ++++++++
src/test/regress/sql/alter_table.sql      |    9 ++++++
6 files changed, 67 insertions(+), 8 deletions(-)



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

* pgsql: Prevent a rowtype from being included in itself.
@ 2011-03-28 19:46 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 11+ messages in thread

From: Tom Lane @ 2011-03-28 19:46 UTC (permalink / raw)
  To: pgsql-committers

Prevent a rowtype from being included in itself.

Eventually we might be able to allow that, but it's not clear how many
places need to be fixed to prevent infinite recursion when there's a direct
or indirect inclusion of a rowtype in itself.  One such place is
CheckAttributeType(), which will recurse to stack overflow in cases such as
those exhibited in bug #5950 from Alex Perepelica.  If we were sure it was
the only such place, we could easily modify the code added by this patch to
stop the recursion without a complaint ... but it probably isn't the only
such place.  Hence, throw error until such time as someone is excited
enough about this type of usage to put work into making it safe.

Back-patch as far as 8.3.  8.2 doesn't have the recursive call in
CheckAttributeType in the first place, so I see no need to add code there
in the absence of clear evidence of a problem elsewhere.

Branch
------
REL8_3_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/cfce572aceb0a8c809f5f52b7c8002b9917bcb19

Modified Files
--------------
src/backend/catalog/heap.c                |   43 ++++++++++++++++++++++++++---
src/backend/commands/tablecmds.c          |    6 +++-
src/include/catalog/heap.h                |    3 +-
src/test/regress/expected/alter_table.out |   12 ++++++++
src/test/regress/sql/alter_table.sql      |    9 ++++++
5 files changed, 66 insertions(+), 7 deletions(-)



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

* pgsql: Prevent a rowtype from being included in itself via a range.
@ 2019-12-23 17:08 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 11+ messages in thread

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

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

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

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



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

* pgsql: Prevent a rowtype from being included in itself via a range.
@ 2019-12-23 17:08 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 11+ messages in thread

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

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

Details
-------
https://git.postgresql.org/pg/commitdiff/976cb11f6c58b8807455982ae7344b72ea2cd1ab

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



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

* pgsql: Prevent a rowtype from being included in itself via a range.
@ 2019-12-23 17:08 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 11+ messages in thread

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

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

Details
-------
https://git.postgresql.org/pg/commitdiff/31dfa40a834177b8e989a59252ee3ce1a3309075

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



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

* pgsql: Prevent a rowtype from being included in itself via a range.
@ 2019-12-23 17:08 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 11+ messages in thread

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

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

Details
-------
https://git.postgresql.org/pg/commitdiff/4af2531d03930c1fa1aa7ffc9b7cda9e23d7c03a

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



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

* pgsql: Prevent a rowtype from being included in itself via a range.
@ 2019-12-23 17:08 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 11+ messages in thread

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

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_6_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/354d913f9745c4ce39c891d9a73b0b2535fd9c4c

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



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

* pgsql: Prevent a rowtype from being included in itself via a range.
@ 2019-12-23 17:08 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 11+ messages in thread

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

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



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

* pgsql: Prevent a rowtype from being included in itself via a range.
@ 2019-12-23 17:08 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 11+ messages in thread

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

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



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


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

Thread overview: 11+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-03-28 19:46 pgsql: Prevent a rowtype from being included in itself. Tom Lane <tgl@sss.pgh.pa.us>
2011-03-28 19:46 pgsql: Prevent a rowtype from being included in itself. Tom Lane <tgl@sss.pgh.pa.us>
2011-03-28 19:46 pgsql: Prevent a rowtype from being included in itself. Tom Lane <tgl@sss.pgh.pa.us>
2011-03-28 19:46 pgsql: Prevent a rowtype from being included in itself. Tom Lane <tgl@sss.pgh.pa.us>
2019-12-23 17:08 pgsql: Prevent a rowtype from being included in itself via a range. Tom Lane <tgl@sss.pgh.pa.us>
2019-12-23 17:08 pgsql: Prevent a rowtype from being included in itself via a range. Tom Lane <tgl@sss.pgh.pa.us>
2019-12-23 17:08 pgsql: Prevent a rowtype from being included in itself via a range. Tom Lane <tgl@sss.pgh.pa.us>
2019-12-23 17:08 pgsql: Prevent a rowtype from being included in itself via a range. Tom Lane <tgl@sss.pgh.pa.us>
2019-12-23 17:08 pgsql: Prevent a rowtype from being included in itself via a range. Tom Lane <tgl@sss.pgh.pa.us>
2019-12-23 17:08 pgsql: Prevent a rowtype from being included in itself via a range. Tom Lane <tgl@sss.pgh.pa.us>
2019-12-23 17:08 pgsql: Prevent a rowtype from being included in itself via a range. 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