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

From Michael Fuhr
Subject Re: Oddity with extract microseconds?
Date
Msg-id 20051207022201.GA60740@winnie.fuhr.org
Whole thread Raw
In response to Re: Oddity with extract microseconds?  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
Responses Re: Oddity with extract microseconds?  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
List 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


pgsql-hackers by date:

Previous
From: Euler Taveira de Oliveira
Date:
Subject: row is too big: size 8916, maximum size 8136
Next
From: Christopher Kings-Lynne
Date:
Subject: Re: Oddity with extract microseconds?