forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commite1e6069
committed
Make CREATE AGGREGATE complain if the initcond is invalid for the datatype.
The initial transition value is stored as a text string and not fed to thetransition type's input function until runtime (so that values such as"now" don't get frozen at creation time). Previously, CREATE AGGREGATEdidn't do anything with it but that, which meant that even erroneous valueswould be accepted and not complained of until the aggregate is used. Thisseems unhelpful, and it's confused at least one user, as in Rhys Stewart'srecent report. It seems worth taking a few more cycles to invoke the inputfunction and verify that the value is acceptable. We can't do this if thetransition type is polymorphic, but in normal aggregates we know the actualtransition type so we can call the right input function.1 parent7072635 commite1e6069
1 file changed
+21
-1
lines changedLines changed: 21 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
61 | 61 |
| |
62 | 62 |
| |
63 | 63 |
| |
| 64 | + | |
64 | 65 |
| |
65 | 66 |
| |
66 | 67 |
| |
| |||
181 | 182 |
| |
182 | 183 |
| |
183 | 184 |
| |
184 |
| - | |
| 185 | + | |
| 186 | + | |
185 | 187 |
| |
186 | 188 |
| |
187 | 189 |
| |
| |||
193 | 195 |
| |
194 | 196 |
| |
195 | 197 |
| |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
196 | 216 |
| |
197 | 217 |
| |
198 | 218 |
| |
|
0 commit comments
Comments
(0)