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
---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match