Re: Oddity with extract microseconds?

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Oddity with extract microseconds?
Дата
Msg-id 200512061709.jB6H9JD16121@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: Oddity with extract microseconds?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Oddity with extract microseconds?
Список pgsql-hackers
Tom Lane wrote:
> Christopher Kings-Lynne <chriskl@familyhealth.com.au> 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,
Pennsylvania19073
 


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Oddity with extract microseconds?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Oddity with extract microseconds?