forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit80ffcb8
committed
Improve ALTER PUBLICATION validation and error messages
Attempting to add a system column for a table to an existing publicationwould result in the not very intuitive error message of:ERROR: negative bitmapset member not allowedHere we improve that to have it display the same error message as a userwould see if they tried adding a system column for a table when addingit to the publication in the first place.Doing this requires making the function which validates the list ofcolumns an extern function. The signature of the static function wasn'tan ideal external API as it made the code more complex than it needed to be.Here we adjust the function to have it populate a Bitmapset of attributenumbers. Doing it this way allows code simplification.There was no particular bug here other than the weird error message, sono backpatch.Bug: #18558Reported-by: Alexander Lakhin <exclusion@gmail.com>Author: Peter Smith, David RowleyDiscussion:https://postgr.es/m/18558-411bc81b03592125@postgresql.org1 parentef6e028 commit80ffcb8
File tree
6 files changed
+66
-80
lines changed- src
- backend
- catalog
- commands
- include/catalog
- test/regress
- expected
- sql
6 files changed
+66
-80
lines changedLines changed: 46 additions & 64 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
48 | 48 |
| |
49 | 49 |
| |
50 | 50 |
| |
51 |
| - | |
52 |
| - | |
53 |
| - | |
54 | 51 |
| |
55 | 52 |
| |
56 | 53 |
| |
| |||
351 | 348 |
| |
352 | 349 |
| |
353 | 350 |
| |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
354 | 378 |
| |
355 | 379 |
| |
356 | 380 |
| |
| |||
365 | 389 |
| |
366 | 390 |
| |
367 | 391 |
| |
| 392 | + | |
368 | 393 |
| |
369 |
| - | |
370 |
| - | |
371 | 394 |
| |
372 | 395 |
| |
373 | 396 |
| |
| 397 | + | |
374 | 398 |
| |
375 | 399 |
| |
376 | 400 |
| |
| |||
395 | 419 |
| |
396 | 420 |
| |
397 | 421 |
| |
398 |
| - | |
399 |
| - | |
400 |
| - | |
401 |
| - | |
402 |
| - | |
403 |
| - | |
404 |
| - | |
| 422 | + | |
| 423 | + | |
405 | 424 |
| |
406 | 425 |
| |
407 | 426 |
| |
| |||
423 | 442 |
| |
424 | 443 |
| |
425 | 444 |
| |
426 |
| - | |
| 445 | + | |
427 | 446 |
| |
428 | 447 |
| |
429 | 448 |
| |
| |||
451 | 470 |
| |
452 | 471 |
| |
453 | 472 |
| |
454 |
| - | |
| 473 | + | |
| 474 | + | |
455 | 475 |
| |
456 |
| - | |
| 476 | + | |
457 | 477 |
| |
458 | 478 |
| |
459 | 479 |
| |
| |||
476 | 496 |
| |
477 | 497 |
| |
478 | 498 |
| |
479 |
| - | |
480 |
| - | |
481 |
| - | |
482 |
| - | |
483 |
| - | |
484 |
| - | |
485 |
| - | |
486 |
| - | |
487 |
| - | |
488 |
| - | |
489 |
| - | |
490 | 499 |
| |
491 |
| - | |
492 |
| - | |
493 |
| - | |
494 |
| - | |
495 |
| - | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
496 | 505 |
| |
497 |
| - | |
498 |
| - | |
499 |
| - | |
| 506 | + | |
| 507 | + | |
500 | 508 |
| |
501 |
| - | |
502 |
| - | |
503 |
| - | |
| 509 | + | |
| 510 | + | |
504 | 511 |
| |
505 |
| - | |
506 | 512 |
| |
507 | 513 |
| |
508 |
| - | |
509 | 514 |
| |
510 | 515 |
| |
511 |
| - | |
512 |
| - | |
513 |
| - | |
514 |
| - | |
515 |
| - | |
516 |
| - | |
517 |
| - | |
518 |
| - | |
519 |
| - | |
520 | 516 |
| |
521 | 517 |
| |
522 | 518 |
| |
| |||
547 | 543 |
| |
548 | 544 |
| |
549 | 545 |
| |
550 |
| - | |
551 | 546 |
| |
552 | 547 |
| |
553 |
| - | |
554 |
| - | |
555 |
| - | |
556 |
| - | |
557 |
| - | |
558 |
| - | |
559 |
| - | |
| 548 | + | |
560 | 549 |
| |
561 | 550 |
| |
562 | 551 |
| |
| |||
569 | 558 |
| |
570 | 559 |
| |
571 | 560 |
| |
572 |
| - | |
| 561 | + | |
573 | 562 |
| |
574 | 563 |
| |
575 | 564 |
| |
576 | 565 |
| |
577 | 566 |
| |
578 |
| - | |
579 |
| - | |
580 |
| - | |
581 |
| - | |
582 |
| - | |
583 |
| - | |
584 |
| - | |
585 | 567 |
| |
586 | 568 |
| |
587 | 569 |
| |
|
Lines changed: 7 additions & 15 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1176 | 1176 |
| |
1177 | 1177 |
| |
1178 | 1178 |
| |
1179 |
| - | |
1180 |
| - | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
1181 | 1183 |
| |
1182 |
| - | |
1183 |
| - | |
1184 |
| - | |
1185 |
| - | |
1186 |
| - | |
1187 |
| - | |
1188 |
| - | |
1189 |
| - | |
1190 |
| - | |
1191 |
| - | |
1192 |
| - | |
1193 |
| - | |
| 1184 | + | |
| 1185 | + | |
1194 | 1186 |
| |
1195 | 1187 |
| |
1196 | 1188 |
| |
| |||
1199 | 1191 |
| |
1200 | 1192 |
| |
1201 | 1193 |
| |
1202 |
| - | |
| 1194 | + | |
1203 | 1195 |
| |
1204 | 1196 |
| |
1205 | 1197 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2266 | 2266 |
| |
2267 | 2267 |
| |
2268 | 2268 |
| |
2269 |
| - | |
| 2269 | + | |
2270 | 2270 |
| |
2271 | 2271 |
| |
2272 | 2272 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
152 | 152 |
| |
153 | 153 |
| |
154 | 154 |
| |
| 155 | + | |
155 | 156 |
| |
156 | 157 |
| |
157 | 158 |
| |
|
Lines changed: 7 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
693 | 693 |
| |
694 | 694 |
| |
695 | 695 |
| |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
696 | 703 |
| |
697 | 704 |
| |
698 | 705 |
| |
|
Lines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
417 | 417 |
| |
418 | 418 |
| |
419 | 419 |
| |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
420 | 424 |
| |
421 | 425 |
| |
422 | 426 |
| |
|
0 commit comments
Comments
(0)