pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Prevent altering partitioned table's rowtype, if it's used elsew
6+ messages / 1 participants
[nested] [flat]

* pgsql: Prevent altering partitioned table's rowtype, if it's used elsew
@ 2022-01-06 21:47 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2022-01-06 21:47 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Prevent altering partitioned table's rowtype, if it's used elsewhere.

We disallow altering a column datatype within a regular table,
if the table's rowtype is used as a column type elsewhere,
because we lack code to go around and rewrite the other tables.
This restriction should apply to partitioned tables as well, but it
was not checked because ATRewriteTables and ATPrepAlterColumnType
were not on the same page about who should do it for which relkinds.

Per bug #17351 from Alexander Lakhin.  Back-patch to all supported
branches.

Discussion: https://postgr.es/m/17351-6db1870f3f4f612a@postgresql.org

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/7ead9925ff94cfc9c3237672b7d19d5cc1b27ef5

Modified Files
--------------
src/backend/commands/tablecmds.c          |  7 +++----
src/test/regress/expected/alter_table.out | 23 ++++++++++++++++++-----
src/test/regress/sql/alter_table.sql      | 19 +++++++++++++++----
3 files changed, 36 insertions(+), 13 deletions(-)



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

* pgsql: Prevent altering partitioned table's rowtype, if it's used elsew
@ 2022-01-06 21:47 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2022-01-06 21:47 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Prevent altering partitioned table's rowtype, if it's used elsewhere.

We disallow altering a column datatype within a regular table,
if the table's rowtype is used as a column type elsewhere,
because we lack code to go around and rewrite the other tables.
This restriction should apply to partitioned tables as well, but it
was not checked because ATRewriteTables and ATPrepAlterColumnType
were not on the same page about who should do it for which relkinds.

Per bug #17351 from Alexander Lakhin.  Back-patch to all supported
branches.

Discussion: https://postgr.es/m/17351-6db1870f3f4f612a@postgresql.org

Branch
------
REL_14_STABLE

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

Modified Files
--------------
src/backend/commands/tablecmds.c          |  7 +++----
src/test/regress/expected/alter_table.out | 23 ++++++++++++++++++-----
src/test/regress/sql/alter_table.sql      | 19 +++++++++++++++----
3 files changed, 36 insertions(+), 13 deletions(-)



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

* pgsql: Prevent altering partitioned table's rowtype, if it's used elsew
@ 2022-01-06 21:47 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2022-01-06 21:47 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Prevent altering partitioned table's rowtype, if it's used elsewhere.

We disallow altering a column datatype within a regular table,
if the table's rowtype is used as a column type elsewhere,
because we lack code to go around and rewrite the other tables.
This restriction should apply to partitioned tables as well, but it
was not checked because ATRewriteTables and ATPrepAlterColumnType
were not on the same page about who should do it for which relkinds.

Per bug #17351 from Alexander Lakhin.  Back-patch to all supported
branches.

Discussion: https://postgr.es/m/17351-6db1870f3f4f612a@postgresql.org

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/86d4bbb56a8aa94e8926067a5bf86a5a74b8c933

Modified Files
--------------
src/backend/commands/tablecmds.c          |  7 +++----
src/test/regress/expected/alter_table.out | 23 ++++++++++++++++++-----
src/test/regress/sql/alter_table.sql      | 19 +++++++++++++++----
3 files changed, 36 insertions(+), 13 deletions(-)



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

* pgsql: Prevent altering partitioned table's rowtype, if it's used elsew
@ 2022-01-06 21:47 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2022-01-06 21:47 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Prevent altering partitioned table's rowtype, if it's used elsewhere.

We disallow altering a column datatype within a regular table,
if the table's rowtype is used as a column type elsewhere,
because we lack code to go around and rewrite the other tables.
This restriction should apply to partitioned tables as well, but it
was not checked because ATRewriteTables and ATPrepAlterColumnType
were not on the same page about who should do it for which relkinds.

Per bug #17351 from Alexander Lakhin.  Back-patch to all supported
branches.

Discussion: https://postgr.es/m/17351-6db1870f3f4f612a@postgresql.org

Branch
------
REL_12_STABLE

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

Modified Files
--------------
src/backend/commands/tablecmds.c          |  7 +++----
src/test/regress/expected/alter_table.out | 23 ++++++++++++++++++-----
src/test/regress/sql/alter_table.sql      | 19 +++++++++++++++----
3 files changed, 36 insertions(+), 13 deletions(-)



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

* pgsql: Prevent altering partitioned table's rowtype, if it's used elsew
@ 2022-01-06 21:47 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2022-01-06 21:47 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Prevent altering partitioned table's rowtype, if it's used elsewhere.

We disallow altering a column datatype within a regular table,
if the table's rowtype is used as a column type elsewhere,
because we lack code to go around and rewrite the other tables.
This restriction should apply to partitioned tables as well, but it
was not checked because ATRewriteTables and ATPrepAlterColumnType
were not on the same page about who should do it for which relkinds.

Per bug #17351 from Alexander Lakhin.  Back-patch to all supported
branches.

Discussion: https://postgr.es/m/17351-6db1870f3f4f612a@postgresql.org

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/2ce113a4f085e078286a921d4cbe63b0dc34794e

Modified Files
--------------
src/backend/commands/tablecmds.c          |  8 +++++---
src/test/regress/expected/alter_table.out | 23 ++++++++++++++++++-----
src/test/regress/sql/alter_table.sql      | 19 +++++++++++++++----
3 files changed, 38 insertions(+), 12 deletions(-)



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

* pgsql: Prevent altering partitioned table's rowtype, if it's used elsew
@ 2022-01-06 21:47 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2022-01-06 21:47 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Prevent altering partitioned table's rowtype, if it's used elsewhere.

We disallow altering a column datatype within a regular table,
if the table's rowtype is used as a column type elsewhere,
because we lack code to go around and rewrite the other tables.
This restriction should apply to partitioned tables as well, but it
was not checked because ATRewriteTables and ATPrepAlterColumnType
were not on the same page about who should do it for which relkinds.

Per bug #17351 from Alexander Lakhin.  Back-patch to all supported
branches.

Discussion: https://postgr.es/m/17351-6db1870f3f4f612a@postgresql.org

Branch
------
REL_10_STABLE

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

Modified Files
--------------
src/backend/commands/tablecmds.c          |  7 ++++---
src/test/regress/expected/alter_table.out | 23 ++++++++++++++++++-----
src/test/regress/sql/alter_table.sql      | 19 +++++++++++++++----
3 files changed, 37 insertions(+), 12 deletions(-)



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


end of thread, other threads:[~2022-01-06 21:47 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-01-06 21:47 pgsql: Prevent altering partitioned table's rowtype, if it's used elsew Tom Lane <tgl@sss.pgh.pa.us>
2022-01-06 21:47 pgsql: Prevent altering partitioned table's rowtype, if it's used elsew Tom Lane <tgl@sss.pgh.pa.us>
2022-01-06 21:47 pgsql: Prevent altering partitioned table's rowtype, if it's used elsew Tom Lane <tgl@sss.pgh.pa.us>
2022-01-06 21:47 pgsql: Prevent altering partitioned table's rowtype, if it's used elsew Tom Lane <tgl@sss.pgh.pa.us>
2022-01-06 21:47 pgsql: Prevent altering partitioned table's rowtype, if it's used elsew Tom Lane <tgl@sss.pgh.pa.us>
2022-01-06 21:47 pgsql: Prevent altering partitioned table's rowtype, if it's used elsew 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