forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit26ae3aa
committed
Remove redundant function calls in timestamp[tz]_part().
The DTK_DOW/DTK_ISODOW and DTK_DOY switch cases in timestamp_part() andtimestamptz_part() contained calls of timestamp2tm() that were fullyredundant with the ones done just above the switch. This evidently creptin during commit258ee1b, which relocated that code from another placewhere the calls were indeed needed. Just delete the redundant calls.I (tgl) noted that our test coverage of these functions left quite abit to be desired, so extend timestamp.sql and timestamptz.sql tocover all the branches.Back-patch to all supported branches, as the previous commit was.There's no real issue here other than some wasted cycles in somenot-too-heavily-used code paths, but the test coverage seems valuable.Report and patch by Li Japin; test case adjustments by me.Discussion:https://postgr.es/m/SG2PR06MB37762CAE45DB0F6CA7001EA9B6550@SG2PR06MB3776.apcprd06.prod.outlook.com1 parent8ed428d commit26ae3aa
File tree
5 files changed
+693
-395
lines changed- src
- backend/utils/adt
- test/regress
- expected
- sql
5 files changed
+693
-395
lines changedLines changed: 0 additions & 16 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4651 | 4651 |
| |
4652 | 4652 |
| |
4653 | 4653 |
| |
4654 |
| - | |
4655 |
| - | |
4656 |
| - | |
4657 |
| - | |
4658 | 4654 |
| |
4659 | 4655 |
| |
4660 | 4656 |
| |
4661 | 4657 |
| |
4662 | 4658 |
| |
4663 | 4659 |
| |
4664 |
| - | |
4665 |
| - | |
4666 |
| - | |
4667 |
| - | |
4668 | 4660 |
| |
4669 | 4661 |
| |
4670 | 4662 |
| |
| |||
4855 | 4847 |
| |
4856 | 4848 |
| |
4857 | 4849 |
| |
4858 |
| - | |
4859 |
| - | |
4860 |
| - | |
4861 |
| - | |
4862 | 4850 |
| |
4863 | 4851 |
| |
4864 | 4852 |
| |
4865 | 4853 |
| |
4866 | 4854 |
| |
4867 | 4855 |
| |
4868 |
| - | |
4869 |
| - | |
4870 |
| - | |
4871 |
| - | |
4872 | 4856 |
| |
4873 | 4857 |
| |
4874 | 4858 |
| |
|
0 commit comments
Comments
(0)