forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit7445f09
committed
Fix failure of ALTER FOREIGN TABLE SET SCHEMA to move sequences.
Ordinary ALTER TABLE SET SCHEMA will also move any owned sequencesinto the new schema. We failed to do likewise for foreign tables,because AlterTableNamespaceInternal believed that only certainrelkinds could have indexes, owned sequences, or constraints.We could simply add foreign tables to that relkind list, but itseems likely that the same oversight could be made again infuture. Instead let's remove the relkind filter altogether.These functions shouldn't cost much when there are no objectsthat they need to process, and surely this isn't an especiallyperformance-critical case anyway.Per bug #18407 from Vidushi Gupta. Back-patch to all supportedbranches.Discussion:https://postgr.es/m/18407-4fd07373d252c6a0@postgresql.org1 parent7651fd3 commit7445f09
File tree
3 files changed
+24
-22
lines changed- src
- backend/commands
- test/regress
- expected
- sql
3 files changed
+24
-22
lines changedLines changed: 5 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
16560 | 16560 |
| |
16561 | 16561 |
| |
16562 | 16562 |
| |
16563 |
| - | |
16564 |
| - | |
16565 |
| - | |
16566 |
| - | |
16567 |
| - | |
16568 |
| - | |
16569 |
| - | |
16570 |
| - | |
16571 |
| - | |
16572 |
| - | |
| 16563 | + | |
| 16564 | + | |
| 16565 | + | |
| 16566 | + | |
| 16567 | + | |
16573 | 16568 |
| |
16574 | 16569 |
| |
16575 | 16570 |
| |
|
Lines changed: 17 additions & 12 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
892 | 892 |
| |
893 | 893 |
| |
894 | 894 |
| |
| 895 | + | |
895 | 896 |
| |
896 | 897 |
| |
897 | 898 |
| |
| 899 | + | |
| 900 | + | |
| 901 | + | |
898 | 902 |
| |
899 | 903 |
| |
900 | 904 |
| |
901 |
| - | |
902 |
| - | |
903 |
| - | |
904 |
| - | |
905 |
| - | |
906 |
| - | |
907 |
| - | |
908 |
| - | |
909 |
| - | |
910 |
| - | |
911 |
| - | |
912 |
| - | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
913 | 918 |
| |
914 | 919 |
| |
915 | 920 |
| |
|
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
419 | 419 |
| |
420 | 420 |
| |
421 | 421 |
| |
| 422 | + | |
422 | 423 |
| |
423 | 424 |
| |
| 425 | + | |
424 | 426 |
| |
425 | 427 |
| |
426 | 428 |
| |
|
0 commit comments
Comments
(0)