forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit6743c5a
committed
Fix propagation of persistence to sequences in ALTER TABLE / ADD COLUMN
Fix for344d62f: That commit introduced unlogged sequences andmade it so that identity/serial sequences automatically get thepersistence level of their owning table. But this works only forCREATE TABLE and not for ALTER TABLE / ADD COLUMN. The latter wouldalways create the sequence as logged (default), independent of thepersistence setting of the table. This is fixed here.Note: It is allowed to change the persistence of identity sequencesdirectly using ALTER SEQUENCE. So mistakes in existing databases canbe fixed manually.Reviewed-by: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>Discussion:https://www.postgresql.org/message-id/flat/c4b6e2ed-bcdf-4ea7-965f-e49761094827%40eisentraut.org1 parent3c44746 commit6743c5a
File tree
3 files changed
+100
-1
lines changed- src
- backend/parser
- test/regress
- expected
- sql
3 files changed
+100
-1
lines changedLines changed: 10 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
459 | 459 |
| |
460 | 460 |
| |
461 | 461 |
| |
462 |
| - | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
463 | 472 |
| |
464 | 473 |
| |
465 | 474 |
| |
|
Lines changed: 72 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
365 | 365 |
| |
366 | 366 |
| |
367 | 367 |
| |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
368 | 440 |
| |
369 | 441 |
| |
370 | 442 |
| |
|
Lines changed: 18 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
214 | 214 |
| |
215 | 215 |
| |
216 | 216 |
| |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
217 | 235 |
| |
218 | 236 |
| |
219 | 237 |
| |
|
0 commit comments
Comments
(0)