Re: Oddity with extract microseconds?

Поиск
Список
Период
Сортировка
От Christopher Kings-Lynne
Тема Re: Oddity with extract microseconds?
Дата
Msg-id 439650F1.4050901@familyhealth.com.au
обсуждение исходный текст
Ответ на Re: Oddity with extract microseconds?  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
> mysql> SELECT EXTRACT(MICROSECOND FROM '2003-01-02 10:30:01.00123');
> +-------------------------------------------------------+
> | EXTRACT(MICROSECOND FROM '2003-01-02 10:30:01.00123') |
> +-------------------------------------------------------+
> |                                                  1230 |
> +-------------------------------------------------------+
> 1 row in set (0.00 sec)
> 
> Does contrary behavior from MySQL count as evidence that PostgreSQL's
> behavior is correct? :-)

No...I happen to think that their way is more consistent though.  Pity 
it's not in the spec.

At least PostgreSQL is consistent with seconds/microseconds:

mysql=# select extract(seconds from timestamp '2005-01-01 00:00:01.01'); date_part
-----------      1.01
(1 row)

Chris



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

Предыдущее
От: Michael Fuhr
Дата:
Сообщение: Re: Oddity with extract microseconds?
Следующее
От: Michael Fuhr
Дата:
Сообщение: Re: Oddity with extract microseconds?