forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit39ebb94
committed
Disallow partition key expressions that return pseudo-types.
This wasn't checked originally, but it should have been, becausein general pseudo-types can't be stored to and retrieved from disk.Notably, partition bound values of type "record" would not beinterpretable by another session.In v12 and HEAD, add another flag to CheckAttributeType's repertoireso that it can produce a specific error message for this case. That'sinfeasible in older branches without an ABI break, so fall back toa slightly-less-nicely-worded error message in v10 and v11.Problem noted by Amit Langote, though this patch is not his initialsolution. Back-patch to v10 where partitioning was introduced.Discussion:https://postgr.es/m/CA+HiwqFUzjfj9HEsJtYWcr1SgQ_=iCAvQ=O2Sx6aQxoDu4OiHw@mail.gmail.com1 parentfc76958 commit39ebb94
File tree
5 files changed
+71
-14
lines changed- src
- backend
- catalog
- commands
- include/catalog
- test/regress
- expected
- sql
5 files changed
+71
-14
lines changedLines changed: 33 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
572 | 572 |
| |
573 | 573 |
| |
574 | 574 |
| |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
575 | 579 |
| |
576 | 580 |
| |
577 | 581 |
| |
| |||
598 | 602 |
| |
599 | 603 |
| |
600 | 604 |
| |
601 |
| - | |
602 |
| - | |
603 |
| - | |
604 |
| - | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
605 | 618 |
| |
606 | 619 |
| |
607 | 620 |
| |
| |||
648 | 661 |
| |
649 | 662 |
| |
650 | 663 |
| |
651 |
| - | |
| 664 | + | |
652 | 665 |
| |
653 | 666 |
| |
654 | 667 |
| |
| |||
679 | 692 |
| |
680 | 693 |
| |
681 | 694 |
| |
682 |
| - | |
683 |
| - | |
684 |
| - | |
685 |
| - | |
686 |
| - | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
687 | 710 |
| |
688 | 711 |
| |
689 | 712 |
| |
|
Lines changed: 14 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4899 | 4899 |
| |
4900 | 4900 |
| |
4901 | 4901 |
| |
4902 |
| - | |
4903 |
| - | |
| 4902 | + | |
| 4903 | + | |
4904 | 4904 |
| |
4905 | 4905 |
| |
4906 | 4906 |
| |
| |||
15096 | 15096 |
| |
15097 | 15097 |
| |
15098 | 15098 |
| |
| 15099 | + | |
15099 | 15100 |
| |
15100 | 15101 |
| |
15101 | 15102 |
| |
15102 | 15103 |
| |
15103 | 15104 |
| |
| 15105 | + | |
| 15106 | + | |
| 15107 | + | |
| 15108 | + | |
| 15109 | + | |
| 15110 | + | |
| 15111 | + | |
| 15112 | + | |
| 15113 | + | |
| 15114 | + | |
| 15115 | + | |
15104 | 15116 |
| |
15105 | 15117 |
| |
15106 | 15118 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
22 | 22 |
| |
23 | 23 |
| |
24 | 24 |
| |
| 25 | + | |
25 | 26 |
| |
26 | 27 |
| |
27 | 28 |
| |
|
Lines changed: 12 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
375 | 375 |
| |
376 | 376 |
| |
377 | 377 |
| |
378 |
| - | |
| 378 | + | |
379 | 379 |
| |
380 | 380 |
| |
381 | 381 |
| |
| |||
402 | 402 |
| |
403 | 403 |
| |
404 | 404 |
| |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
405 | 416 |
| |
406 | 417 |
| |
407 | 418 |
| |
|
Lines changed: 11 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
361 | 361 |
| |
362 | 362 |
| |
363 | 363 |
| |
364 |
| - | |
| 364 | + | |
365 | 365 |
| |
366 | 366 |
| |
367 | 367 |
| |
| |||
384 | 384 |
| |
385 | 385 |
| |
386 | 386 |
| |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
387 | 397 |
| |
388 | 398 |
| |
389 | 399 |
| |
|
0 commit comments
Comments
(0)