- Notifications
You must be signed in to change notification settings - Fork5
Commit07daff6
committed
Fix select_common_type() so that it can select a domain type, if all inputs
to a UNION, CASE, or related construct are of the same domain type. Themain part of this routine smashes domains to their base types, which seemsnecessary because the logic involves TypeCategory() and IsPreferredType(),neither of which work usefully on domains. However, we can add a firstpass that just detects whether all the inputs are exactly the same type,and if so accept that without question (so long as it's not UNKNOWN).Per recent gripe from Dean Rasheed.In passing, remove some tests for InvalidOid, which have clearly been deadcode for quite some time now, because getBaseType() would fail on that input.Also, clarify the manual's not-very-precise description of the existingalgorithm's behavior.1 parent3f398e4 commit07daff6
File tree
4 files changed
+73
-11
lines changed- doc/src/sgml
- src
- backend/parser
- test/regress
- expected
- sql
4 files changed
+73
-11
lines changedLines changed: 22 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 |
| - | |
| 1 | + | |
2 | 2 |
| |
3 | 3 |
| |
4 | 4 |
| |
| |||
843 | 843 |
| |
844 | 844 |
| |
845 | 845 |
| |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
846 | 854 |
| |
847 | 855 |
| |
848 | 856 |
| |
849 | 857 |
| |
850 |
| - | |
| 858 | + | |
851 | 859 |
| |
852 | 860 |
| |
853 | 861 |
| |
| |||
860 | 868 |
| |
861 | 869 |
| |
862 | 870 |
| |
863 |
| - | |
864 |
| - | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
865 | 881 |
| |
866 | 882 |
| |
867 | 883 |
| |
868 | 884 |
| |
869 | 885 |
| |
870 |
| - | |
| 886 | + | |
| 887 | + | |
871 | 888 |
| |
872 | 889 |
| |
873 | 890 |
| |
|
Lines changed: 27 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
958 | 958 |
| |
959 | 959 |
| |
960 | 960 |
| |
961 |
| - | |
| 961 | + | |
962 | 962 |
| |
963 | 963 |
| |
964 | 964 |
| |
| |||
971 | 971 |
| |
972 | 972 |
| |
973 | 973 |
| |
974 |
| - | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
975 | 996 |
| |
976 | 997 |
| |
977 | 998 |
| |
978 | 999 |
| |
979 | 1000 |
| |
980 | 1001 |
| |
981 | 1002 |
| |
982 |
| - | |
| 1003 | + | |
983 | 1004 |
| |
984 |
| - | |
| 1005 | + | |
985 | 1006 |
| |
986 |
| - | |
| 1007 | + | |
987 | 1008 |
| |
988 | 1009 |
| |
989 | 1010 |
| |
|
Lines changed: 19 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
69 | 69 |
| |
70 | 70 |
| |
71 | 71 |
| |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
72 | 91 |
| |
73 | 92 |
| |
74 | 93 |
| |
|
Lines changed: 5 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
58 | 58 |
| |
59 | 59 |
| |
60 | 60 |
| |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
61 | 66 |
| |
62 | 67 |
| |
63 | 68 |
| |
|
0 commit comments
Comments
(0)