Commit bf797a8
committed
Disallow ALTER TABLE ONLY / DROP EXPRESSION
The current implementation cannot handle this correctly, so just
forbid it for now.
GENERATED clauses must be attached to the column definition and cannot
be added later like DEFAULT, so if a child table has a generation
expression that the parent does not have, the child column will
necessarily be an attlocal column. So to implement ALTER TABLE ONLY /
DROP EXPRESSION, we'd need extra code to update attislocal of the
direct child tables, somewhat similar to how DROP COLUMN does it, so
that the resulting state can be properly dumped and restored.
Discussion: https://www.postgresql.org/message-id/flat/15830.1575468847%40sss.pgh.pa.us1 parent 2f70fdb commit bf797a8
File tree
3 files changed
+26
-9
lines changed- src
- backend/commands
- test/regress
- expected
- sql
3 files changed
+26
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
413 | 413 | | |
414 | 414 | | |
415 | 415 | | |
416 | | - | |
| 416 | + | |
417 | 417 | | |
418 | 418 | | |
419 | 419 | | |
| |||
4151 | 4151 | | |
4152 | 4152 | | |
4153 | 4153 | | |
4154 | | - | |
| 4154 | + | |
4155 | 4155 | | |
4156 | 4156 | | |
4157 | 4157 | | |
| |||
7262 | 7262 | | |
7263 | 7263 | | |
7264 | 7264 | | |
7265 | | - | |
| 7265 | + | |
7266 | 7266 | | |
| 7267 | + | |
| 7268 | + | |
| 7269 | + | |
| 7270 | + | |
| 7271 | + | |
| 7272 | + | |
| 7273 | + | |
| 7274 | + | |
| 7275 | + | |
| 7276 | + | |
| 7277 | + | |
| 7278 | + | |
| 7279 | + | |
| 7280 | + | |
| 7281 | + | |
| 7282 | + | |
7267 | 7283 | | |
7268 | 7284 | | |
7269 | 7285 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
805 | 805 | | |
806 | 806 | | |
807 | 807 | | |
808 | | - | |
| 808 | + | |
| 809 | + | |
809 | 810 | | |
810 | | - | |
811 | | - | |
812 | | - | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
813 | 814 | | |
814 | | - | |
| 815 | + | |
815 | 816 | | |
816 | 817 | | |
817 | 818 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
411 | 411 | | |
412 | 412 | | |
413 | 413 | | |
414 | | - | |
| 414 | + | |
415 | 415 | | |
416 | 416 | | |
417 | 417 | | |
| |||
0 commit comments