- Notifications
You must be signed in to change notification settings - Fork5.3k
Commit713d9a8
committed
Update some timestamp[tz] functions to use soft-error reporting
This commit updates two functions that convert "timestamptz" to"timestamp", and vice-versa, to use the soft error reporting rather thana their own logic to do the same. These are now named as follows:- timestamp2timestamptz_safe()- timestamptz2timestamp_safe()These functions were suffixed with "_opt_overflow", previously.This shaves some code, as it is possible to detect how a timestamp[tz]overflowed based on the returned value rather than a custom state. Itis optionally possible for the callers of these functions to rely on theerror generated internally by these functions, depending on the errorcontext.Similar work has been done ind03668e and4246a97.Reviewed-by: Amul Sul <sulamul@gmail.com>Discussion:https://postgr.es/m/aS09YF2GmVXjAxbJ@paquier.xyz1 parent19b9662 commit713d9a8
File tree
3 files changed
+54
-87
lines changed- contrib/btree_gin
- src
- backend/utils/adt
- include/utils
3 files changed
+54
-87
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
508 | 508 | | |
509 | 509 | | |
510 | 510 | | |
| 511 | + | |
511 | 512 | | |
512 | | - | |
513 | 513 | | |
514 | | - | |
515 | | - | |
| 514 | + | |
| 515 | + | |
516 | 516 | | |
517 | 517 | | |
518 | 518 | | |
| |||
543 | 543 | | |
544 | 544 | | |
545 | 545 | | |
| 546 | + | |
546 | 547 | | |
547 | | - | |
548 | 548 | | |
549 | | - | |
550 | | - | |
| 549 | + | |
| 550 | + | |
551 | 551 | | |
552 | 552 | | |
553 | 553 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2363 | 2363 | | |
2364 | 2364 | | |
2365 | 2365 | | |
2366 | | - | |
| 2366 | + | |
2367 | 2367 | | |
2368 | | - | |
2369 | | - | |
| 2368 | + | |
| 2369 | + | |
2370 | 2370 | | |
2371 | | - | |
2372 | | - | |
2373 | | - | |
2374 | | - | |
2375 | | - | |
2376 | | - | |
2377 | | - | |
| 2371 | + | |
| 2372 | + | |
| 2373 | + | |
| 2374 | + | |
| 2375 | + | |
| 2376 | + | |
| 2377 | + | |
| 2378 | + | |
| 2379 | + | |
| 2380 | + | |
2378 | 2381 | | |
2379 | 2382 | | |
2380 | 2383 | | |
| |||
6434 | 6437 | | |
6435 | 6438 | | |
6436 | 6439 | | |
6437 | | - | |
| 6440 | + | |
| 6441 | + | |
6438 | 6442 | | |
6439 | | - | |
6440 | | - | |
6441 | | - | |
6442 | | - | |
| 6443 | + | |
| 6444 | + | |
| 6445 | + | |
6443 | 6446 | | |
6444 | 6447 | | |
6445 | | - | |
| 6448 | + | |
6446 | 6449 | | |
6447 | 6450 | | |
6448 | 6451 | | |
6449 | 6452 | | |
6450 | 6453 | | |
6451 | 6454 | | |
6452 | 6455 | | |
6453 | | - | |
6454 | | - | |
6455 | | - | |
6456 | 6456 | | |
6457 | 6457 | | |
6458 | 6458 | | |
| |||
6467 | 6467 | | |
6468 | 6468 | | |
6469 | 6469 | | |
6470 | | - | |
6471 | | - | |
6472 | | - | |
6473 | | - | |
6474 | | - | |
6475 | | - | |
6476 | | - | |
6477 | | - | |
6478 | | - | |
6479 | | - | |
6480 | | - | |
6481 | | - | |
6482 | | - | |
6483 | | - | |
| 6470 | + | |
| 6471 | + | |
| 6472 | + | |
| 6473 | + | |
6484 | 6474 | | |
6485 | | - | |
| 6475 | + | |
6486 | 6476 | | |
6487 | 6477 | | |
6488 | | - | |
6489 | | - | |
6490 | 6478 | | |
6491 | 6479 | | |
6492 | 6480 | | |
| |||
6495 | 6483 | | |
6496 | 6484 | | |
6497 | 6485 | | |
6498 | | - | |
| 6486 | + | |
6499 | 6487 | | |
6500 | 6488 | | |
6501 | 6489 | | |
| |||
6515 | 6503 | | |
6516 | 6504 | | |
6517 | 6505 | | |
6518 | | - | |
| 6506 | + | |
6519 | 6507 | | |
6520 | 6508 | | |
6521 | 6509 | | |
6522 | 6510 | | |
6523 | 6511 | | |
6524 | | - | |
| 6512 | + | |
| 6513 | + | |
6525 | 6514 | | |
6526 | | - | |
6527 | | - | |
6528 | | - | |
6529 | | - | |
| 6515 | + | |
| 6516 | + | |
| 6517 | + | |
6530 | 6518 | | |
6531 | 6519 | | |
6532 | | - | |
| 6520 | + | |
6533 | 6521 | | |
6534 | 6522 | | |
6535 | 6523 | | |
6536 | 6524 | | |
6537 | 6525 | | |
6538 | 6526 | | |
6539 | 6527 | | |
6540 | | - | |
6541 | | - | |
6542 | | - | |
6543 | 6528 | | |
6544 | 6529 | | |
6545 | 6530 | | |
6546 | 6531 | | |
6547 | 6532 | | |
6548 | 6533 | | |
6549 | | - | |
6550 | | - | |
6551 | | - | |
6552 | | - | |
6553 | | - | |
6554 | | - | |
6555 | | - | |
6556 | | - | |
6557 | | - | |
6558 | | - | |
6559 | | - | |
6560 | | - | |
6561 | | - | |
6562 | | - | |
6563 | | - | |
| 6534 | + | |
| 6535 | + | |
| 6536 | + | |
| 6537 | + | |
| 6538 | + | |
| 6539 | + | |
6564 | 6540 | | |
6565 | 6541 | | |
6566 | 6542 | | |
6567 | 6543 | | |
6568 | 6544 | | |
6569 | | - | |
6570 | | - | |
6571 | | - | |
6572 | | - | |
6573 | | - | |
6574 | | - | |
6575 | | - | |
6576 | | - | |
6577 | | - | |
6578 | | - | |
6579 | | - | |
6580 | | - | |
6581 | | - | |
6582 | | - | |
6583 | | - | |
| 6545 | + | |
| 6546 | + | |
| 6547 | + | |
| 6548 | + | |
| 6549 | + | |
| 6550 | + | |
6584 | 6551 | | |
6585 | 6552 | | |
6586 | 6553 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
| |||
0 commit comments
Comments
(0)