Oddity with extract microseconds?

Поиск
Список
Период
Сортировка
От Christopher Kings-Lynne
Тема Oddity with extract microseconds?
Дата
Msg-id 4395B0C0.1000607@familyhealth.com.au
обсуждение исходный текст
Ответы Re: Oddity with extract microseconds?  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
Список pgsql-hackers
Does anyone else find this odd:

mysql=# select extract(microseconds from timestamp '2005-01-01
00:00:00.123'); date_part
-----------    123000
(1 row)

mysql=# select extract(microseconds from timestamp '2005-01-01
00:00:01.123'); date_part
-----------   1123000
(1 row)

No other extracts include other fields.  eg, minutes:

mysql=# select extract(minutes from timestamp '2005-01-01 00:10:00'); date_part
-----------        10
(1 row)

mysql=# select extract(minutes from timestamp '2005-01-01 10:10:00'); date_part
-----------        10

So how come microseconds includes the microseconds from the 'seconds'
field and not just after the '.'?  And if it's supposed to include
'seconds', then why doesn't it include minutes, hours, etc.?

Chris



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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: [PATCHES] snprintf() argument reordering not working
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: [PATCHES] snprintf() argument reordering not working