pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix failure of ALTER FOREIGN TABLE SET SCHEMA to move sequences.
6+ messages / 1 participants
[nested] [flat]

* pgsql: Fix failure of ALTER FOREIGN TABLE SET SCHEMA to move sequences.
@ 2024-03-26 19:28 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2024-03-26 19:28 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix failure of ALTER FOREIGN TABLE SET SCHEMA to move sequences.

Ordinary ALTER TABLE SET SCHEMA will also move any owned sequences
into the new schema.  We failed to do likewise for foreign tables,
because AlterTableNamespaceInternal believed that only certain
relkinds could have indexes, owned sequences, or constraints.
We could simply add foreign tables to that relkind list, but it
seems likely that the same oversight could be made again in
future.  Instead let's remove the relkind filter altogether.
These functions shouldn't cost much when there are no objects
that they need to process, and surely this isn't an especially
performance-critical case anyway.

Per bug #18407 from Vidushi Gupta.  Back-patch to all supported
branches.

Discussion: https://postgr.es/m/18407-4fd07373d252c6a0@postgresql.org

Branch
------
master

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

Modified Files
--------------
src/backend/commands/tablecmds.c           | 15 +++++----------
src/test/regress/expected/foreign_data.out | 29 +++++++++++++++++------------
src/test/regress/sql/foreign_data.sql      |  2 ++
3 files changed, 24 insertions(+), 22 deletions(-)



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

* pgsql: Fix failure of ALTER FOREIGN TABLE SET SCHEMA to move sequences.
@ 2024-03-26 19:28 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2024-03-26 19:28 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix failure of ALTER FOREIGN TABLE SET SCHEMA to move sequences.

Ordinary ALTER TABLE SET SCHEMA will also move any owned sequences
into the new schema.  We failed to do likewise for foreign tables,
because AlterTableNamespaceInternal believed that only certain
relkinds could have indexes, owned sequences, or constraints.
We could simply add foreign tables to that relkind list, but it
seems likely that the same oversight could be made again in
future.  Instead let's remove the relkind filter altogether.
These functions shouldn't cost much when there are no objects
that they need to process, and surely this isn't an especially
performance-critical case anyway.

Per bug #18407 from Vidushi Gupta.  Back-patch to all supported
branches.

Discussion: https://postgr.es/m/18407-4fd07373d252c6a0@postgresql.org

Branch
------
REL_16_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/7445f092814dbb8ac3061524fc341a209f805d80

Modified Files
--------------
src/backend/commands/tablecmds.c           | 15 +++++----------
src/test/regress/expected/foreign_data.out | 29 +++++++++++++++++------------
src/test/regress/sql/foreign_data.sql      |  2 ++
3 files changed, 24 insertions(+), 22 deletions(-)



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

* pgsql: Fix failure of ALTER FOREIGN TABLE SET SCHEMA to move sequences.
@ 2024-03-26 19:28 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2024-03-26 19:28 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix failure of ALTER FOREIGN TABLE SET SCHEMA to move sequences.

Ordinary ALTER TABLE SET SCHEMA will also move any owned sequences
into the new schema.  We failed to do likewise for foreign tables,
because AlterTableNamespaceInternal believed that only certain
relkinds could have indexes, owned sequences, or constraints.
We could simply add foreign tables to that relkind list, but it
seems likely that the same oversight could be made again in
future.  Instead let's remove the relkind filter altogether.
These functions shouldn't cost much when there are no objects
that they need to process, and surely this isn't an especially
performance-critical case anyway.

Per bug #18407 from Vidushi Gupta.  Back-patch to all supported
branches.

Discussion: https://postgr.es/m/18407-4fd07373d252c6a0@postgresql.org

Branch
------
REL_15_STABLE

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

Modified Files
--------------
src/backend/commands/tablecmds.c           | 15 +++++----------
src/test/regress/expected/foreign_data.out | 29 +++++++++++++++++------------
src/test/regress/sql/foreign_data.sql      |  2 ++
3 files changed, 24 insertions(+), 22 deletions(-)



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

* pgsql: Fix failure of ALTER FOREIGN TABLE SET SCHEMA to move sequences.
@ 2024-03-26 19:28 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2024-03-26 19:28 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix failure of ALTER FOREIGN TABLE SET SCHEMA to move sequences.

Ordinary ALTER TABLE SET SCHEMA will also move any owned sequences
into the new schema.  We failed to do likewise for foreign tables,
because AlterTableNamespaceInternal believed that only certain
relkinds could have indexes, owned sequences, or constraints.
We could simply add foreign tables to that relkind list, but it
seems likely that the same oversight could be made again in
future.  Instead let's remove the relkind filter altogether.
These functions shouldn't cost much when there are no objects
that they need to process, and surely this isn't an especially
performance-critical case anyway.

Per bug #18407 from Vidushi Gupta.  Back-patch to all supported
branches.

Discussion: https://postgr.es/m/18407-4fd07373d252c6a0@postgresql.org

Branch
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/66bbad581ce289fab8a55152987a223fe8795fee

Modified Files
--------------
src/backend/commands/tablecmds.c           | 15 +++++----------
src/test/regress/expected/foreign_data.out | 29 +++++++++++++++++------------
src/test/regress/sql/foreign_data.sql      |  2 ++
3 files changed, 24 insertions(+), 22 deletions(-)



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

* pgsql: Fix failure of ALTER FOREIGN TABLE SET SCHEMA to move sequences.
@ 2024-03-26 19:28 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2024-03-26 19:28 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix failure of ALTER FOREIGN TABLE SET SCHEMA to move sequences.

Ordinary ALTER TABLE SET SCHEMA will also move any owned sequences
into the new schema.  We failed to do likewise for foreign tables,
because AlterTableNamespaceInternal believed that only certain
relkinds could have indexes, owned sequences, or constraints.
We could simply add foreign tables to that relkind list, but it
seems likely that the same oversight could be made again in
future.  Instead let's remove the relkind filter altogether.
These functions shouldn't cost much when there are no objects
that they need to process, and surely this isn't an especially
performance-critical case anyway.

Per bug #18407 from Vidushi Gupta.  Back-patch to all supported
branches.

Discussion: https://postgr.es/m/18407-4fd07373d252c6a0@postgresql.org

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/97de2a15992f997b3461a4a6a6172f43e60308f0

Modified Files
--------------
src/backend/commands/tablecmds.c           | 15 +++++----------
src/test/regress/expected/foreign_data.out | 29 +++++++++++++++++------------
src/test/regress/sql/foreign_data.sql      |  2 ++
3 files changed, 24 insertions(+), 22 deletions(-)



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

* pgsql: Fix failure of ALTER FOREIGN TABLE SET SCHEMA to move sequences.
@ 2024-03-26 19:28 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2024-03-26 19:28 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix failure of ALTER FOREIGN TABLE SET SCHEMA to move sequences.

Ordinary ALTER TABLE SET SCHEMA will also move any owned sequences
into the new schema.  We failed to do likewise for foreign tables,
because AlterTableNamespaceInternal believed that only certain
relkinds could have indexes, owned sequences, or constraints.
We could simply add foreign tables to that relkind list, but it
seems likely that the same oversight could be made again in
future.  Instead let's remove the relkind filter altogether.
These functions shouldn't cost much when there are no objects
that they need to process, and surely this isn't an especially
performance-critical case anyway.

Per bug #18407 from Vidushi Gupta.  Back-patch to all supported
branches.

Discussion: https://postgr.es/m/18407-4fd07373d252c6a0@postgresql.org

Branch
------
REL_12_STABLE

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

Modified Files
--------------
src/backend/commands/tablecmds.c           | 15 +++++----------
src/test/regress/expected/foreign_data.out | 29 +++++++++++++++++------------
src/test/regress/sql/foreign_data.sql      |  2 ++
3 files changed, 24 insertions(+), 22 deletions(-)



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


end of thread, other threads:[~2024-03-26 19:28 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-03-26 19:28 pgsql: Fix failure of ALTER FOREIGN TABLE SET SCHEMA to move sequences. Tom Lane <tgl@sss.pgh.pa.us>
2024-03-26 19:28 pgsql: Fix failure of ALTER FOREIGN TABLE SET SCHEMA to move sequences. Tom Lane <tgl@sss.pgh.pa.us>
2024-03-26 19:28 pgsql: Fix failure of ALTER FOREIGN TABLE SET SCHEMA to move sequences. Tom Lane <tgl@sss.pgh.pa.us>
2024-03-26 19:28 pgsql: Fix failure of ALTER FOREIGN TABLE SET SCHEMA to move sequences. Tom Lane <tgl@sss.pgh.pa.us>
2024-03-26 19:28 pgsql: Fix failure of ALTER FOREIGN TABLE SET SCHEMA to move sequences. Tom Lane <tgl@sss.pgh.pa.us>
2024-03-26 19:28 pgsql: Fix failure of ALTER FOREIGN TABLE SET SCHEMA to move sequences. 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