Re: Duplicate function call on timestamp2tm

2019-12-12 Thread Tom Lane
Li Japin writes: > Thanks for your confirm. Is there anything I can do? No, I've got it. In adding the test coverage I spoke of, I thought we should allow the date_part tests to check all the entries in timestamp[tz]_tbl not just those around current time, and I found an independent problem:

Re: Duplicate function call on timestamp2tm

2019-12-12 Thread Li Japin
Thanks for your confirm. Is there anything I can do? On Dec 12, 2019, at 11:13 PM, Tom Lane mailto:t...@sss.pgh.pa.us>> wrote: Ah, after looking in the git history, not quite that ancient: this duplication dates to commit 258ee1b63, which moved these switch cases from the "if (type == RESERV)"

Re: Duplicate function call on timestamp2tm

2019-12-12 Thread Tom Lane
I wrote: > Li Japin writes: >> I find there is a duplicate function call on timestamp2tm in >> timestamptz_part and timestamp_part. >> Is that necessary? I remove the latter one and it also works. > Huh. I do believe you're right. Must be an ancient copy-and-pas

Re: Duplicate function call on timestamp2tm

2019-12-12 Thread Tom Lane
Li Japin writes: > I find there is a duplicate function call on timestamp2tm in timestamptz_part > and timestamp_part. > Is that necessary? I remove the latter one and it also works. Huh. I do believe you're right. Must be an ancient copy-and-paste mistake?

Duplicate function call on timestamp2tm

2019-12-12 Thread Li Japin
Hi, I find there is a duplicate function call on timestamp2tm in timestamptz_part and timestamp_part. Is that necessary? I remove the latter one and it also works. Best, Japin. remove-duplicate-timestamp2tm-function-call.patch Description: remove-duplicate-timestamp2tm-function-call.patch