forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit36d4efe
committed
Avoid invalid array reference in transformAlterTableStmt().
Don't try to look at the attidentity field of system attributes,because they're not there in the TupleDescAttr array. Sometimesthis is harmless because we accidentally pick up a zero, butotherwise we'll report "no owned sequence found" from an attemptto alter a system attribute. (It seems possible that a SIGSEGVcould occur, too, though I've not seen it in testing.)It's not in this function's charter to complain that you can'talter a system column, so instead just hard-wire an assumptionthat system attributes aren't identities. I didn't bother witha regression test because the appearance of the bug is veryerratic.Per bug #17465 from Roman Zharkov. Back-patch to all supportedbranches. (There's not actually a live bug before v12, becausebefore that get_attidentity() did the right thing anyway.But for consistency I changed the test in the older branches too.)Discussion:https://postgr.es/m/17465-f2a554a6cb5740d3@postgresql.org1 parent1a8b110 commit36d4efe
1 file changed
+2
-1
lines changedLines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3424 | 3424 |
| |
3425 | 3425 |
| |
3426 | 3426 |
| |
3427 |
| - | |
| 3427 | + | |
| 3428 | + | |
3428 | 3429 |
| |
3429 | 3430 |
| |
3430 | 3431 |
| |
|
0 commit comments
Comments
(0)