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

From Michael Fuhr
Subject Re: Oddity with extract microseconds?
Date
Msg-id 20051207024154.GA60917@winnie.fuhr.org
Whole thread Raw
In response to Re: Oddity with extract microseconds?  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
List pgsql-hackers
On Wed, Dec 07, 2005 at 10:32:20AM +0800, Christopher Kings-Lynne wrote:
> >MySQL 5.0.16 gives an error:
> >
> >mysql> SELECT EXTRACT (MICROSECOND FROM '2003-01-02 10:30:00.00123');
> >ERROR 1064 (42000): You have an error in your SQL syntax; check the manual
> >that corresponds to your MySQL server version for the right syntax to use
> >near 'FROM '2003-01-02 10:30:00.00123')' at line 1
> 
> Odd, that example is straight from the MySQL 5 manual:
> 
> http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html

Looks like MySQL doesn't allow a space before the open parenthesis
(there isn't one in the manual's example):

mysql> SELECT EXTRACT(MICROSECOND FROM '2003-01-02 10:30:00.00123');
+-------------------------------------------------------+
| EXTRACT(MICROSECOND FROM '2003-01-02 10:30:00.00123') |
+-------------------------------------------------------+
|                                                  1230 |
+-------------------------------------------------------+
1 row in set (0.01 sec)

-- 
Michael Fuhr


pgsql-hackers by date:

Previous
From: Christopher Kings-Lynne
Date:
Subject: Re: Oddity with extract microseconds?
Next
From: Christopher Kings-Lynne
Date:
Subject: Re: Oddity with extract microseconds?