Re: Duplicate function call on timestamp2tm

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Duplicate function call on timestamp2tm
Дата
Msg-id 5511.1576163597@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Duplicate function call on timestamp2tm  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Duplicate function call on timestamp2tm  (Li Japin <japinli@hotmail.com>)
Список pgsql-hackers
I wrote:
> Li Japin <japinli@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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: David Fetter
Дата:
Сообщение: Re: Let people set host(no)ssl settings from initdb
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Wrong assert in TransactionGroupUpdateXidStatus