Re: Oddity with extract microseconds? - Mailing list pgsql-hackers

From Harald Fuchs
Subject Re: Oddity with extract microseconds?
Date
Msg-id 87bqztxnum.fsf@srv.protecting.net
Whole thread Raw
In response to Re: Oddity with extract microseconds?  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
In article <439650F1.4050901@familyhealth.com.au>,
Christopher Kings-Lynne <chriskl@familyhealth.com.au> writes:

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.

I'd say the comparison with MySQL is useless because MySQL is unable
to store microseconds in a DATETIME or TIMESTAMP column, although you
can extract microseconds from a date/time literal.



pgsql-hackers by date:

Previous
From: "J. Andrew Rogers"
Date:
Subject: Re: Replication on the backend
Next
From: "J. Andrew Rogers"
Date:
Subject: Re: Replication on the backend