- Notifications
You must be signed in to change notification settings - Fork5
Commit31edbad
committed
Downgrade implicit casts to text to be assignment-only, except for the ones
from the other string-category types; this eliminates a lot of surprisinginterpretations that the parser could formerly make when there was no directlyapplicable operator.Create a general mechanism that supports casts to and from the standard stringtypes (text,varchar,bpchar) for *every* datatype, by invoking the datatype'sI/O functions. These new casts are assignment-only in the to-string direction,explicit-only in the other, and therefore should create no surprising behavior.Remove a bunch of thereby-obsoleted datatype-specific casting functions.The "general mechanism" is a new expression node type CoerceViaIO that canactually convert between *any* two datatypes if their external textrepresentations are compatible. This is more general than needed for theimmediate feature, but might be useful in plpgsql or other places in future.This commit does nothing about the issue that applying the concatenationoperator || to non-text types will now fail, often with strange error messagesdue to misinterpreting the operator as array concatenation. Since it often(not always) worked before, we should either make it succeed or at least givea more user-friendly error; but details are still under debate.Peter Eisentraut and Tom Lane1 parent1120b99 commit31edbad
File tree
60 files changed
+848
-1610
lines changed- contrib
- cube
- expected
- sql
- isn
- doc/src/sgml
- ref
- src
- backend
- catalog
- executor
- nodes
- optimizer
- path
- util
- parser
- utils
- adt
- include
- catalog
- nodes
- parser
- utils
- pl/plpgsql/src
- test/regress
- expected
- sql
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
60 files changed
+848
-1610
lines changedLines changed: 0 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
236 | 236 |
| |
237 | 237 |
| |
238 | 238 |
| |
239 |
| - | |
240 |
| - | |
241 |
| - | |
242 |
| - | |
243 | 239 |
| |
244 | 240 |
| |
245 | 241 |
| |
|
Lines changed: 1 addition & 13 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 |
| - | |
| 2 | + | |
3 | 3 |
| |
4 | 4 |
| |
5 | 5 |
| |
| |||
173 | 173 |
| |
174 | 174 |
| |
175 | 175 |
| |
176 |
| - | |
177 |
| - | |
178 |
| - | |
179 |
| - | |
180 |
| - | |
181 |
| - | |
182 |
| - | |
183 |
| - | |
184 |
| - | |
185 |
| - | |
186 |
| - | |
187 |
| - | |
188 | 176 |
| |
189 | 177 |
| |
190 | 178 |
| |
|
Lines changed: 0 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
31 | 31 |
| |
32 | 32 |
| |
33 | 33 |
| |
34 |
| - | |
35 |
| - | |
36 |
| - | |
37 |
| - | |
38 |
| - | |
39 |
| - | |
40 |
| - | |
41 |
| - | |
42 |
| - | |
43 |
| - | |
44 | 34 |
| |
45 | 35 |
| |
46 | 36 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
826 | 826 |
| |
827 | 827 |
| |
828 | 828 |
| |
829 |
| - | |
| 829 | + | |
830 | 830 |
| |
831 | 831 |
| |
832 | 832 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
826 | 826 |
| |
827 | 827 |
| |
828 | 828 |
| |
829 |
| - | |
| 829 | + | |
830 | 830 |
| |
831 | 831 |
| |
832 | 832 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
826 | 826 |
| |
827 | 827 |
| |
828 | 828 |
| |
829 |
| - | |
| 829 | + | |
830 | 830 |
| |
831 | 831 |
| |
832 | 832 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
223 | 223 |
| |
224 | 224 |
| |
225 | 225 |
| |
226 |
| - | |
| 226 | + | |
227 | 227 |
| |
228 | 228 |
| |
229 | 229 |
| |
|
Lines changed: 0 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
92 | 92 |
| |
93 | 93 |
| |
94 | 94 |
| |
95 |
| - | |
96 |
| - | |
97 |
| - | |
98 |
| - | |
99 | 95 |
|
Lines changed: 1 addition & 84 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
10 |
| - | |
| 10 | + | |
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
| |||
39 | 39 |
| |
40 | 40 |
| |
41 | 41 |
| |
42 |
| - | |
43 |
| - | |
44 |
| - | |
45 |
| - | |
46 | 42 |
| |
47 | 43 |
| |
48 | 44 |
| |
| |||
1042 | 1038 |
| |
1043 | 1039 |
| |
1044 | 1040 |
| |
1045 |
| - | |
1046 |
| - | |
1047 |
| - | |
1048 |
| - | |
1049 |
| - | |
1050 |
| - | |
1051 |
| - | |
1052 |
| - | |
1053 |
| - | |
1054 |
| - | |
1055 |
| - | |
1056 |
| - | |
1057 |
| - | |
1058 |
| - | |
1059 |
| - | |
1060 |
| - | |
1061 |
| - | |
1062 |
| - | |
1063 |
| - | |
1064 |
| - | |
1065 |
| - | |
1066 |
| - | |
1067 |
| - | |
1068 |
| - | |
1069 | 1041 |
| |
1070 | 1042 |
| |
1071 | 1043 |
| |
| |||
1115 | 1087 |
| |
1116 | 1088 |
| |
1117 | 1089 |
| |
1118 |
| - | |
1119 |
| - | |
1120 |
| - | |
1121 |
| - | |
1122 |
| - | |
1123 |
| - | |
1124 |
| - | |
1125 |
| - | |
1126 |
| - | |
1127 |
| - | |
1128 |
| - | |
1129 |
| - | |
1130 |
| - | |
1131 |
| - | |
1132 |
| - | |
1133 |
| - | |
1134 |
| - | |
1135 |
| - | |
1136 |
| - | |
1137 |
| - | |
1138 |
| - | |
1139 |
| - | |
1140 |
| - | |
1141 |
| - | |
1142 |
| - | |
1143 |
| - | |
1144 |
| - | |
1145 |
| - | |
1146 |
| - | |
1147 |
| - | |
1148 |
| - | |
1149 |
| - | |
1150 |
| - | |
1151 |
| - | |
1152 |
| - | |
1153 |
| - | |
1154 |
| - | |
1155 |
| - | |
1156 |
| - | |
1157 |
| - | |
1158 |
| - | |
1159 |
| - | |
1160 |
| - | |
1161 |
| - | |
1162 |
| - | |
1163 |
| - | |
1164 |
| - | |
1165 |
| - | |
1166 |
| - | |
1167 |
| - | |
1168 |
| - | |
1169 |
| - | |
1170 |
| - | |
1171 |
| - | |
1172 |
| - | |
1173 | 1090 |
| |
1174 | 1091 |
| |
1175 | 1092 |
| |
|
Lines changed: 1 addition & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
10 |
| - | |
| 10 | + | |
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
| |||
38 | 38 |
| |
39 | 39 |
| |
40 | 40 |
| |
41 |
| - | |
42 |
| - | |
43 |
| - | |
44 |
| - | |
45 |
| - | |
46 |
| - | |
47 |
| - | |
48 | 41 |
| |
49 | 42 |
| |
50 | 43 |
| |
|
Lines changed: 1 addition & 86 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2 | 2 |
| |
3 | 3 |
| |
4 | 4 |
| |
5 |
| - | |
| 5 | + | |
6 | 6 |
| |
7 | 7 |
| |
8 | 8 |
| |
| |||
2966 | 2966 |
| |
2967 | 2967 |
| |
2968 | 2968 |
| |
2969 |
| - | |
2970 |
| - | |
2971 |
| - | |
2972 |
| - | |
2973 |
| - | |
2974 |
| - | |
2975 |
| - | |
2976 |
| - | |
2977 |
| - | |
2978 |
| - | |
2979 |
| - | |
2980 |
| - | |
2981 |
| - | |
2982 |
| - | |
2983 |
| - | |
2984 |
| - | |
2985 |
| - | |
2986 |
| - | |
2987 |
| - | |
2988 |
| - | |
2989 |
| - | |
2990 |
| - | |
2991 |
| - | |
2992 |
| - | |
2993 |
| - | |
2994 |
| - | |
2995 |
| - | |
2996 |
| - | |
2997 |
| - | |
2998 |
| - | |
2999 |
| - | |
3000 |
| - | |
3001 |
| - | |
3002 |
| - | |
3003 |
| - | |
3004 |
| - | |
3005 |
| - | |
3006 |
| - | |
3007 |
| - | |
3008 |
| - | |
3009 |
| - | |
3010 |
| - | |
3011 |
| - | |
3012 |
| - | |
3013 |
| - | |
3014 |
| - | |
3015 |
| - | |
3016 |
| - | |
3017 |
| - | |
3018 |
| - | |
3019 |
| - | |
3020 |
| - | |
3021 |
| - | |
3022 |
| - | |
3023 |
| - | |
3024 |
| - | |
3025 |
| - | |
3026 |
| - | |
3027 |
| - | |
3028 |
| - | |
3029 |
| - | |
3030 |
| - | |
3031 |
| - | |
3032 |
| - | |
3033 |
| - | |
3034 |
| - | |
3035 |
| - | |
3036 | 2969 |
| |
3037 | 2970 |
| |
3038 | 2971 |
| |
| |||
3056 | 2989 |
| |
3057 | 2990 |
| |
3058 | 2991 |
| |
3059 |
| - | |
3060 |
| - | |
3061 |
| - | |
3062 |
| - | |
3063 |
| - | |
3064 |
| - | |
3065 |
| - | |
3066 |
| - | |
3067 |
| - | |
3068 |
| - | |
3069 |
| - | |
3070 |
| - | |
3071 |
| - | |
3072 |
| - | |
3073 |
| - | |
3074 |
| - | |
3075 |
| - | |
3076 |
| - | |
3077 | 2992 |
| |
3078 | 2993 |
| |
3079 | 2994 |
| |
|
Lines changed: 14 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 |
| - | |
| 1 | + | |
2 | 2 |
| |
3 | 3 |
| |
4 | 4 |
| |
| |||
1358 | 1358 |
| |
1359 | 1359 |
| |
1360 | 1360 |
| |
1361 |
| - | |
1362 |
| - | |
| 1361 | + | |
| 1362 | + | |
1363 | 1363 |
| |
1364 | 1364 |
| |
1365 | 1365 |
| |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
| 1372 | + | |
| 1373 | + | |
| 1374 | + | |
| 1375 | + | |
| 1376 | + | |
1366 | 1377 |
| |
1367 | 1378 |
| |
1368 | 1379 |
| |
|
0 commit comments
Comments
(0)