Tom Lane wrote:
> Christopher Kings-Lynne <[EMAIL PROTECTED]> writes:
> > OK, AndrewSN just pointed out that it's "documented" to work like that...
> > ...still seems bizarre...
> 
> It seems reasonably consistent to me.  extract() doesn't consider
> seconds and fractional seconds to be distinct fields: it's all one
> value.  The milliseconds and microseconds options just shift the
> decimal place for you.

I think this illustrates the issue:

        test=> SELECT date_part('microseconds', '00:00:01.33'::time);
         date_part
        -----------
           1330000
        (1 row)
        
        test=> SELECT date_part('microseconds', '00:03:01.33'::time);
         date_part
        -----------
           1330000
        (1 row)

Why aren't 'minutes' considered too?  Because they aren't 'seconds'. 
Well, seconds aren't microseconds either.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org

Reply via email to