From: | Michael Fuhr <mike(at)fuhr(dot)org> |
---|---|
To: | Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Oddity with extract microseconds? |
Date: | 2005-12-07 02:41:54 |
Message-ID: | 20051207024154.GA60917@winnie.fuhr.org |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Christopher Kings-Lynne | 2005-12-07 02:47:45 | Re: Oddity with extract microseconds? |
Previous Message | Christopher Kings-Lynne | 2005-12-07 02:32:20 | Re: Oddity with extract microseconds? |