forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit542320c
committed
Be more careful about printing constants in ruleutils.c.
The previous coding in get_const_expr() tried to avoid quoting integer,float, and numeric literals if at all possible. While that looks nice,it means that dumped expressions might re-parse to something that'ssemantically equivalent but not the exact same parsetree; for examplea FLOAT8 constant would re-parse as a NUMERIC constant with a cast toFLOAT8. Though the result would be the same after constant-folding,this is problematic in certain contexts. In particular, Jeff Davispointed out that this could cause unexpected failures in ALTER INHERIToperations because of child tables having not-exactly-equivalent CHECKexpressions. Therefore, favor correctness over legibility and dumpsuch constants in quotes except in the limited cases where they'llbe interpreted as the same type even without any casting.This results in assorted small changes in the regression test outputs,and will affect display of user-defined views and rules similarly.The odds of that causing problems in the field seem non-negligible;given the lack of previous complaints, it seems best not to changethis in the back branches.1 parent701dcc9 commit542320c
File tree
12 files changed
+114
-101
lines changed- contrib
- btree_gist/expected
- postgres_fdw/expected
- src
- backend/utils/adt
- test/regress/expected
12 files changed
+114
-101
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
78 | 78 |
| |
79 | 79 |
| |
80 | 80 |
| |
81 |
| - | |
| 81 | + | |
82 | 82 |
| |
83 | 83 |
| |
84 | 84 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
78 | 78 |
| |
79 | 79 |
| |
80 | 80 |
| |
81 |
| - | |
| 81 | + | |
82 | 82 |
| |
83 | 83 |
| |
84 | 84 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
78 | 78 |
| |
79 | 79 |
| |
80 | 80 |
| |
81 |
| - | |
| 81 | + | |
82 | 82 |
| |
83 | 83 |
| |
84 | 84 |
| |
|
Lines changed: 3 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
74 | 74 |
| |
75 | 75 |
| |
76 | 76 |
| |
77 |
| - | |
78 |
| - | |
| 77 | + | |
| 78 | + | |
79 | 79 |
| |
80 | 80 |
| |
81 |
| - | |
| 81 | + | |
82 | 82 |
| |
83 | 83 |
| |
84 | 84 |
| |
|
Lines changed: 3 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
190 | 190 |
| |
191 | 191 |
| |
192 | 192 |
| |
193 |
| - | |
194 |
| - | |
| 193 | + | |
| 194 | + | |
195 | 195 |
| |
196 | 196 |
| |
197 | 197 |
| |
198 |
| - | |
| 198 | + | |
199 | 199 |
| |
200 | 200 |
| |
201 | 201 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
874 | 874 |
| |
875 | 875 |
| |
876 | 876 |
| |
877 |
| - | |
| 877 | + | |
878 | 878 |
| |
879 | 879 |
| |
880 | 880 |
| |
|
Lines changed: 52 additions & 39 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
15 | 15 |
| |
16 | 16 |
| |
17 | 17 |
| |
| 18 | + | |
18 | 19 |
| |
19 | 20 |
| |
20 | 21 |
| |
| |||
7977 | 7978 |
| |
7978 | 7979 |
| |
7979 | 7980 |
| |
| 7981 | + | |
| 7982 | + | |
| 7983 | + | |
| 7984 | + | |
| 7985 | + | |
| 7986 | + | |
| 7987 | + | |
7980 | 7988 |
| |
7981 | 7989 |
| |
7982 | 7990 |
| |
| |||
8007 | 8015 |
| |
8008 | 8016 |
| |
8009 | 8017 |
| |
8010 |
| - | |
8011 |
| - | |
| 8018 | + | |
| 8019 | + | |
| 8020 | + | |
8012 | 8021 |
| |
8013 | 8022 |
| |
8014 | 8023 |
| |
| |||
8018 | 8027 |
| |
8019 | 8028 |
| |
8020 | 8029 |
| |
8021 |
| - | |
8022 |
| - | |
| 8030 | + | |
8023 | 8031 |
| |
8024 | 8032 |
| |
8025 | 8033 |
| |
| |||
8045 | 8053 |
| |
8046 | 8054 |
| |
8047 | 8055 |
| |
8048 |
| - | |
8049 | 8056 |
| |
8050 |
| - | |
8051 |
| - | |
8052 |
| - | |
8053 |
| - | |
| 8057 | + | |
| 8058 | + | |
| 8059 | + | |
| 8060 | + | |
| 8061 | + | |
| 8062 | + | |
| 8063 | + | |
| 8064 | + | |
| 8065 | + | |
| 8066 | + | |
| 8067 | + | |
| 8068 | + | |
| 8069 | + | |
| 8070 | + | |
| 8071 | + | |
| 8072 | + | |
| 8073 | + | |
| 8074 | + | |
| 8075 | + | |
8054 | 8076 |
| |
| 8077 | + | |
| 8078 | + | |
| 8079 | + | |
| 8080 | + | |
| 8081 | + | |
| 8082 | + | |
| 8083 | + | |
| 8084 | + | |
8055 | 8085 |
| |
8056 |
| - | |
8057 |
| - | |
8058 |
| - | |
8059 |
| - | |
8060 |
| - | |
8061 |
| - | |
8062 |
| - | |
8063 |
| - | |
8064 |
| - | |
8065 |
| - | |
8066 |
| - | |
8067 |
| - | |
8068 |
| - | |
8069 |
| - | |
8070 |
| - | |
8071 |
| - | |
8072 |
| - | |
8073 |
| - | |
8074 |
| - | |
8075 |
| - | |
8076 |
| - | |
8077 |
| - | |
8078 |
| - | |
8079 |
| - | |
8080 |
| - | |
8081 |
| - | |
| 8086 | + | |
| 8087 | + | |
| 8088 | + | |
| 8089 | + | |
| 8090 | + | |
| 8091 | + | |
8082 | 8092 |
| |
8083 | 8093 |
| |
8084 | 8094 |
| |
| |||
8114 | 8124 |
| |
8115 | 8125 |
| |
8116 | 8126 |
| |
8117 |
| - | |
8118 | 8127 |
| |
8119 | 8128 |
| |
8120 | 8129 |
| |
8121 | 8130 |
| |
| 8131 | + | |
| 8132 | + | |
| 8133 | + | |
8122 | 8134 |
| |
8123 | 8135 |
| |
8124 | 8136 |
| |
8125 |
| - | |
8126 |
| - | |
| 8137 | + | |
| 8138 | + | |
| 8139 | + | |
8127 | 8140 |
| |
8128 |
| - | |
| 8141 | + | |
8129 | 8142 |
| |
8130 | 8143 |
| |
8131 | 8144 |
| |
|
Lines changed: 22 additions & 22 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
104 | 104 |
| |
105 | 105 |
| |
106 | 106 |
| |
107 |
| - | |
108 |
| - | |
| 107 | + | |
| 108 | + | |
109 | 109 |
| |
110 |
| - | |
111 |
| - | |
| 110 | + | |
| 111 | + | |
112 | 112 |
| |
113 | 113 |
| |
114 | 114 |
| |
| |||
139 | 139 |
| |
140 | 140 |
| |
141 | 141 |
| |
142 |
| - | |
143 |
| - | |
| 142 | + | |
| 143 | + | |
144 | 144 |
| |
145 | 145 |
| |
146 | 146 |
| |
147 |
| - | |
| 147 | + | |
148 | 148 |
| |
149 | 149 |
| |
150 | 150 |
| |
| |||
161 | 161 |
| |
162 | 162 |
| |
163 | 163 |
| |
164 |
| - | |
165 |
| - | |
| 164 | + | |
| 165 | + | |
166 | 166 |
| |
167 | 167 |
| |
168 | 168 |
| |
169 |
| - | |
| 169 | + | |
170 | 170 |
| |
171 |
| - | |
| 171 | + | |
172 | 172 |
| |
173 | 173 |
| |
174 | 174 |
| |
| |||
210 | 210 |
| |
211 | 211 |
| |
212 | 212 |
| |
213 |
| - | |
| 213 | + | |
214 | 214 |
| |
215 | 215 |
| |
216 | 216 |
| |
| |||
229 | 229 |
| |
230 | 230 |
| |
231 | 231 |
| |
232 |
| - | |
233 |
| - | |
| 232 | + | |
| 233 | + | |
234 | 234 |
| |
235 | 235 |
| |
236 | 236 |
| |
237 |
| - | |
| 237 | + | |
238 | 238 |
| |
239 | 239 |
| |
240 | 240 |
| |
241 |
| - | |
| 241 | + | |
242 | 242 |
| |
243 |
| - | |
| 243 | + | |
244 | 244 |
| |
245 |
| - | |
| 245 | + | |
246 | 246 |
| |
247 | 247 |
| |
248 | 248 |
| |
| |||
265 | 265 |
| |
266 | 266 |
| |
267 | 267 |
| |
268 |
| - | |
| 268 | + | |
269 | 269 |
| |
270 | 270 |
| |
271 | 271 |
| |
| |||
321 | 321 |
| |
322 | 322 |
| |
323 | 323 |
| |
324 |
| - | |
| 324 | + | |
325 | 325 |
| |
326 | 326 |
| |
327 | 327 |
| |
| |||
341 | 341 |
| |
342 | 342 |
| |
343 | 343 |
| |
344 |
| - | |
| 344 | + | |
345 | 345 |
| |
346 | 346 |
| |
347 | 347 |
| |
| |||
378 | 378 |
| |
379 | 379 |
| |
380 | 380 |
| |
381 |
| - | |
| 381 | + | |
382 | 382 |
| |
383 | 383 |
|
0 commit comments
Comments
(0)