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:22:01 |
Message-ID: | 20051207022201.GA60740@winnie.fuhr.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Dec 07, 2005 at 09:43:30AM +0800, Christopher Kings-Lynne wrote:
> >>Why aren't 'minutes' considered too? Because they aren't 'seconds'.
> >>Well, seconds aren't microseconds either.
> >
> >Yeah, they are: it's just one field. The other way of looking at it
> >(that everything is seconds) is served by "extract(epoch)".
>
> Well, it's different in MySQL unfortunately - what does the standard
> say?
I don't see microseconds as a possible field in SQL:2003 (draft copy).
> Out of interest, can someone try this for me in MySQL 5:
>
> SELECT EXTRACT (MICROSECOND FROM '2003-01-02 10:30:00.00123');
> SELECT EXTRACT (MICROSECOND FROM '2003-01-02 10:30:10.00123');
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
--
Michael Fuhr
From | Date | Subject | |
---|---|---|---|
Next Message | Christopher Kings-Lynne | 2005-12-07 02:32:20 | Re: Oddity with extract microseconds? |
Previous Message | Euler Taveira de Oliveira | 2005-12-07 02:03:16 | row is too big: size 8916, maximum size 8136 |