forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit5c06803
committed
Fix ALTER TABLE ADD COLUMN ... PRIMARY KEY so that the new column is correctly
checked to see if it's been initialized to all non-nulls. The implicit NOTNULL constraint was not being checked during the ALTER (in fact, not even ifthere was an explicit NOT NULL too), because ATExecAddColumn neglected toset the flag needed to make the test happen. This has been broken sincethe capability was first added, in 8.0.Brendan Jurd, per a report from Kaloyan Iliev.1 parent830f276 commit5c06803
File tree
3 files changed
+28
-1
lines changed- src
- backend/commands
- test/regress
- expected
- sql
3 files changed
+28
-1
lines changedLines changed: 6 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
3332 | 3332 |
| |
3333 | 3333 |
| |
3334 | 3334 |
| |
| 3335 | + | |
| 3336 | + | |
| 3337 | + | |
| 3338 | + | |
| 3339 | + | |
3335 | 3340 |
| |
3336 | 3341 |
| |
3337 | 3342 |
| |
|
Lines changed: 12 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
505 | 505 |
| |
506 | 506 |
| |
507 | 507 |
| |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
508 | 520 |
| |
509 | 521 |
| |
510 | 522 |
| |
|
Lines changed: 10 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
506 | 506 |
| |
507 | 507 |
| |
508 | 508 |
| |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
509 | 519 |
| |
510 | 520 |
| |
511 | 521 |
| |
|
0 commit comments
Comments
(0)