- Notifications
You must be signed in to change notification settings - Fork5
Commit647d87c
committed
Make extract() do something more reasonable with infinite datetimes.
Historically, extract() just returned zero for any case involving aninfinite timestamp[tz] input; even cases in which the unit name wasinvalid. This is not very sensible. Instead, return infinity or-infinity as appropriate when the requested field is one that ismonotonically increasing (e.g, year, epoch), or NULL when it is not(e.g., day, hour). Also, throw the expected errors for bad unit names.BACKWARDS INCOMPATIBLE CHANGEVitaly Burovoy, reviewed by Vik Fearing1 parentd9b9289 commit647d87c
File tree
4 files changed
+405
-12
lines changed- doc/src/sgml
- src
- backend/utils/adt
- test/regress
- expected
- sql
4 files changed
+405
-12
lines changedLines changed: 11 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7521 | 7521 |
| |
7522 | 7522 |
| |
7523 | 7523 |
| |
| 7524 | + | |
| 7525 | + | |
| 7526 | + | |
| 7527 | + | |
| 7528 | + | |
| 7529 | + | |
| 7530 | + | |
| 7531 | + | |
| 7532 | + | |
| 7533 | + | |
| 7534 | + | |
7524 | 7535 |
| |
7525 | 7536 |
| |
7526 | 7537 |
| |
|
Lines changed: 99 additions & 12 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4311 | 4311 |
| |
4312 | 4312 |
| |
4313 | 4313 |
| |
| 4314 | + | |
| 4315 | + | |
| 4316 | + | |
| 4317 | + | |
| 4318 | + | |
| 4319 | + | |
| 4320 | + | |
| 4321 | + | |
| 4322 | + | |
| 4323 | + | |
| 4324 | + | |
| 4325 | + | |
| 4326 | + | |
| 4327 | + | |
| 4328 | + | |
| 4329 | + | |
| 4330 | + | |
| 4331 | + | |
| 4332 | + | |
| 4333 | + | |
| 4334 | + | |
| 4335 | + | |
| 4336 | + | |
| 4337 | + | |
| 4338 | + | |
| 4339 | + | |
| 4340 | + | |
| 4341 | + | |
| 4342 | + | |
| 4343 | + | |
| 4344 | + | |
| 4345 | + | |
| 4346 | + | |
| 4347 | + | |
| 4348 | + | |
| 4349 | + | |
| 4350 | + | |
| 4351 | + | |
| 4352 | + | |
| 4353 | + | |
| 4354 | + | |
| 4355 | + | |
| 4356 | + | |
| 4357 | + | |
| 4358 | + | |
| 4359 | + | |
| 4360 | + | |
| 4361 | + | |
| 4362 | + | |
| 4363 | + | |
| 4364 | + | |
| 4365 | + | |
| 4366 | + | |
| 4367 | + | |
| 4368 | + | |
| 4369 | + | |
| 4370 | + | |
| 4371 | + | |
| 4372 | + | |
| 4373 | + | |
| 4374 | + | |
| 4375 | + | |
| 4376 | + | |
| 4377 | + | |
| 4378 | + | |
| 4379 | + | |
| 4380 | + | |
| 4381 | + | |
| 4382 | + | |
| 4383 | + | |
| 4384 | + | |
| 4385 | + | |
| 4386 | + | |
| 4387 | + | |
| 4388 | + | |
| 4389 | + | |
| 4390 | + | |
4314 | 4391 |
| |
4315 | 4392 |
| |
4316 | 4393 |
| |
| |||
4327 | 4404 |
| |
4328 | 4405 |
| |
4329 | 4406 |
| |
4330 |
| - | |
4331 |
| - | |
4332 |
| - | |
4333 |
| - | |
4334 |
| - | |
4335 |
| - | |
4336 | 4407 |
| |
4337 | 4408 |
| |
4338 | 4409 |
| |
| |||
4341 | 4412 |
| |
4342 | 4413 |
| |
4343 | 4414 |
| |
| 4415 | + | |
| 4416 | + | |
| 4417 | + | |
| 4418 | + | |
| 4419 | + | |
| 4420 | + | |
| 4421 | + | |
| 4422 | + | |
| 4423 | + | |
| 4424 | + | |
| 4425 | + | |
4344 | 4426 |
| |
4345 | 4427 |
| |
4346 | 4428 |
| |
| |||
4538 | 4620 |
| |
4539 | 4621 |
| |
4540 | 4622 |
| |
4541 |
| - | |
4542 |
| - | |
4543 |
| - | |
4544 |
| - | |
4545 |
| - | |
4546 |
| - | |
4547 | 4623 |
| |
4548 | 4624 |
| |
4549 | 4625 |
| |
| |||
4552 | 4628 |
| |
4553 | 4629 |
| |
4554 | 4630 |
| |
| 4631 | + | |
| 4632 | + | |
| 4633 | + | |
| 4634 | + | |
| 4635 | + | |
| 4636 | + | |
| 4637 | + | |
| 4638 | + | |
| 4639 | + | |
| 4640 | + | |
| 4641 | + | |
4555 | 4642 |
| |
4556 | 4643 |
| |
4557 | 4644 |
| |
|
0 commit comments
Comments
(0)