forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit749c7c4
committed
Fix handling of container types in find_composite_type_dependencies.
find_composite_type_dependencies correctly found columns that are ofthe specified type, and columns that are of arrays of that type, butnot columns that are domains or ranges over the given type, its arraytype, etc. The most general way to handle this seems to be to assumethat any type that is directly dependent on the specified type can betreated as a container type, and processed recursively (allowing usto handle nested cases such as ranges over domains over arrays ...).Since a type's array type already has such a dependency, we can dropthe existing special case for the array type.The very similar logic in get_rels_with_domain was likewise a fewbricks shy of a load, as it supposed that a directly dependent typecould *only* be a sub-domain. This is already wrong for ranges overdomains, and it'll someday be wrong for arrays over domains.Add test cases illustrating the problems, and back-patch to allsupported branches.Discussion:https://postgr.es/m/15268.1502309024@sss.pgh.pa.us1 parenta76200d commit749c7c4
File tree
4 files changed
+97
-35
lines changed- src
- backend/commands
- test/regress
- expected
- sql
4 files changed
+97
-35
lines changedLines changed: 31 additions & 18 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4849 | 4849 |
| |
4850 | 4850 |
| |
4851 | 4851 |
| |
4852 |
| - | |
4853 |
| - | |
| 4852 | + | |
| 4853 | + | |
4854 | 4854 |
| |
4855 |
| - | |
| 4855 | + | |
4856 | 4856 |
| |
4857 |
| - | |
4858 |
| - | |
| 4857 | + | |
| 4858 | + | |
| 4859 | + | |
| 4860 | + | |
| 4861 | + | |
| 4862 | + | |
| 4863 | + | |
4859 | 4864 |
| |
4860 | 4865 |
| |
4861 | 4866 |
| |
| |||
4868 | 4873 |
| |
4869 | 4874 |
| |
4870 | 4875 |
| |
4871 |
| - | |
| 4876 | + | |
| 4877 | + | |
| 4878 | + | |
4872 | 4879 |
| |
4873 | 4880 |
| |
4874 |
| - | |
4875 |
| - | |
| 4881 | + | |
| 4882 | + | |
4876 | 4883 |
| |
4877 | 4884 |
| |
4878 | 4885 |
| |
| |||
4894 | 4901 |
| |
4895 | 4902 |
| |
4896 | 4903 |
| |
4897 |
| - | |
4898 |
| - | |
| 4904 | + | |
| 4905 | + | |
| 4906 | + | |
| 4907 | + | |
| 4908 | + | |
| 4909 | + | |
| 4910 | + | |
| 4911 | + | |
| 4912 | + | |
| 4913 | + | |
| 4914 | + | |
| 4915 | + | |
| 4916 | + | |
| 4917 | + | |
| 4918 | + | |
| 4919 | + | |
4899 | 4920 |
| |
4900 | 4921 |
| |
4901 | 4922 |
| |
| |||
4952 | 4973 |
| |
4953 | 4974 |
| |
4954 | 4975 |
| |
4955 |
| - | |
4956 |
| - | |
4957 |
| - | |
4958 |
| - | |
4959 |
| - | |
4960 |
| - | |
4961 |
| - | |
4962 |
| - | |
4963 | 4976 |
| |
4964 | 4977 |
| |
4965 | 4978 |
| |
|
Lines changed: 32 additions & 17 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2787 | 2787 |
| |
2788 | 2788 |
| |
2789 | 2789 |
| |
2790 |
| - | |
2791 |
| - | |
2792 |
| - | |
2793 |
| - | |
| 2790 | + | |
| 2791 | + | |
| 2792 | + | |
2794 | 2793 |
| |
2795 | 2794 |
| |
2796 | 2795 |
| |
| |||
2799 | 2798 |
| |
2800 | 2799 |
| |
2801 | 2800 |
| |
| 2801 | + | |
2802 | 2802 |
| |
2803 | 2803 |
| |
2804 | 2804 |
| |
2805 | 2805 |
| |
2806 | 2806 |
| |
2807 | 2807 |
| |
2808 | 2808 |
| |
| 2809 | + | |
| 2810 | + | |
| 2811 | + | |
2809 | 2812 |
| |
2810 | 2813 |
| |
2811 | 2814 |
| |
| |||
2832 | 2835 |
| |
2833 | 2836 |
| |
2834 | 2837 |
| |
2835 |
| - | |
| 2838 | + | |
2836 | 2839 |
| |
2837 | 2840 |
| |
2838 |
| - | |
2839 |
| - | |
2840 |
| - | |
2841 |
| - | |
2842 |
| - | |
2843 |
| - | |
2844 |
| - | |
2845 |
| - | |
2846 |
| - | |
2847 |
| - | |
2848 |
| - | |
| 2841 | + | |
| 2842 | + | |
| 2843 | + | |
| 2844 | + | |
| 2845 | + | |
| 2846 | + | |
| 2847 | + | |
| 2848 | + | |
| 2849 | + | |
| 2850 | + | |
| 2851 | + | |
| 2852 | + | |
| 2853 | + | |
| 2854 | + | |
| 2855 | + | |
| 2856 | + | |
| 2857 | + | |
| 2858 | + | |
| 2859 | + | |
| 2860 | + | |
| 2861 | + | |
| 2862 | + | |
| 2863 | + | |
2849 | 2864 |
| |
2850 | 2865 |
| |
2851 | 2866 |
| |
| |||
2882 | 2897 |
| |
2883 | 2898 |
| |
2884 | 2899 |
| |
2885 |
| - | |
| 2900 | + | |
2886 | 2901 |
| |
2887 | 2902 |
| |
2888 | 2903 |
| |
|
Lines changed: 17 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
661 | 661 |
| |
662 | 662 |
| |
663 | 663 |
| |
| 664 | + | |
664 | 665 |
| |
665 | 666 |
| |
666 | 667 |
| |
667 | 668 |
| |
668 | 669 |
| |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
669 | 686 |
| |
670 | 687 |
| |
671 | 688 |
| |
|
Lines changed: 17 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
451 | 451 |
| |
452 | 452 |
| |
453 | 453 |
| |
| 454 | + | |
454 | 455 |
| |
455 | 456 |
| |
456 | 457 |
| |
457 | 458 |
| |
458 | 459 |
| |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
459 | 476 |
| |
460 | 477 |
| |
461 | 478 |
| |
|
0 commit comments
Comments
(0)