Issue in Behavior of Interval Datatype

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема Issue in Behavior of Interval Datatype
Дата
Msg-id 003201cd70af$eaf058a0$c0d109e0$@kapila@huawei.com
обсуждение исходный текст
Ответы Re: Issue in Behavior of Interval Datatype
Список pgsql-hackers

select (interval '56:48'  minute to second);
result
00:56:48
select (interval '-56:48'  minute to second);
result
-56:48:00
select (interval '+56:48'  minute to second);
result
56:48:00

 

When user uses ‘+’ or ‘–‘ symbol, then minute to second range is getting ignored.

 

I have checked the code and found that in function DecodeInterval(), for timezone case (DTK_TZ) it uses INTERVAL_FULL_RANGE irrespective of range passed by user.

However if use the range passed as argument in function DecodeInterval(), the result of using ‘+’ or ‘-‘ is same as without using it.

Is there any particular reason for ignoring the range for DTK_TZ case in DecodeInterval() function?

 

 

With Regards,

Amit Kapila

 

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