I wrote:
> Li Japin <japi...@hotmail.com> 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?

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)" switches in the
same functions.  In the previous coding these function calls
were actually necessary, but here they're redundant.  I guess
that's just additional ammunition for Greg's point that the
keywords were misclassified ;-).

I see from the code coverage report that we're missing coverage
for these and some other paths in timestamp[tz]_part.  Think
I'll go add some more test cases while I'm at it.

Thanks again for the report!

                        regards, tom lane


Reply via email to