date_part()/EXTRACT(second) behaviour with time data type

Поиск
Список
Период
Сортировка
От Gregory Stark
Тема date_part()/EXTRACT(second) behaviour with time data type
Дата
Msg-id 87ocr31pwt.fsf@oxford.xeocode.com
обсуждение исходный текст
Ответы Re: date_part()/EXTRACT(second) behaviour with time data type  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
I think we broke date_part for extracting seconds from time arguments. It
appears we leave out the milliseconds whereas we don't for timestamp
arguments. This was not the case in 8.3 where we included the milliseconds for
both data types.

Unless this is intentional? I know we wacked around both the meaning of SECOND
for intervals and the code for date_part in a lot of ways. But I don't see why
it would be different for time versus timestamp.

postgres=# select extract(second from now()::time with time zone);date_part 
-----------       27
(1 row)

postgres=# select extract(second from now()::time without time zone);date_part 
-----------       27
(1 row)

postgres=# select extract(second from now()::timestamp with time zone);date_part 
-----------27.782458
(1 row)

postgres=# select extract(second from now()::timestamp without time zone);date_part 
-----------27.782458
(1 row)


--  Gregory Stark http://mit.edu/~gsstark/resume.pdf


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Review: Revise parallel pg_restore's scheduling heuristic
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: plpgsql: support identif%TYPE[], (from ToDo)