Commit a06e41d
committed
Remove arbitrary ALTER TABLE .. ADD COLUMN restriction.
The previous coding prevented ALTER TABLE .. ADD COLUMN from being used
with a non-NULL default in situations where the table's rowtype was being
used elsewhere. But this is a completely arbitrary restriction since
you could do the same operation in multiple steps (add the column, add
the default, update the table).
Inspired by a patch from Noah Misch, though I didn't use his code.1 parent 64bc872 commit a06e41d
File tree
3 files changed
+17
-8
lines changed- src
- backend/commands
- test/regress
- expected
- sql
3 files changed
+17
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
| 145 | + | |
145 | 146 | | |
146 | 147 | | |
147 | 148 | | |
| |||
3378 | 3379 | | |
3379 | 3380 | | |
3380 | 3381 | | |
3381 | | - | |
3382 | | - | |
| 3382 | + | |
| 3383 | + | |
3383 | 3384 | | |
3384 | 3385 | | |
3385 | 3386 | | |
3386 | 3387 | | |
3387 | 3388 | | |
3388 | | - | |
| 3389 | + | |
3389 | 3390 | | |
3390 | 3391 | | |
3391 | 3392 | | |
| |||
6429 | 6430 | | |
6430 | 6431 | | |
6431 | 6432 | | |
| 6433 | + | |
6432 | 6434 | | |
6433 | 6435 | | |
6434 | 6436 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
| 85 | + | |
86 | 86 | | |
87 | | - | |
88 | | - | |
| 87 | + | |
| 88 | + | |
89 | 89 | | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
90 | 93 | | |
91 | 94 | | |
92 | 95 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
49 | 49 | | |
| 50 | + | |
50 | 51 | | |
51 | | - | |
| 52 | + | |
52 | 53 | | |
53 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
54 | 58 | | |
55 | 59 | | |
56 | 60 | | |
| |||
0 commit comments