Re: Timestamp/Interval proposals: Part 2

From: Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
To: Fduch the Pravking <fduch(at)antar(dot)bryansk(dot)ru>
Cc: Hannu Krosing <hannu(at)tm(dot)ee>, Thomas Lockhart <lockhart(at)fourpalms(dot)org>, josh(at)agliodbs(dot)com, hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Timestamp/Interval proposals: Part 2
Date: 2002-06-11 09:31:49
Message-ID: 20020611113149.C19916@zf.jcu.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jun 11, 2002 at 12:37:09PM +0400, Fduch the Pravking wrote:

> And 'DD' is defined as in range 1..31...
> What if I try to select '100 days'?
>
> fduch=> SELECT to_char('100days'::interval, 'YYYY-MM-DD HH24:MI:SS');
> to_char
> ---------------------
> 0000-00-10 00:00:00

I already said it. The to_char() is 'tm' struct interpreter and use
standard internal PG routines for interval to 'tm' conversion. We can
talk about why 100days is converted to '10' days and months aren't
used. I agree this example seems strange. Thomas?

Karel

--
Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
http://home.zf.jcu.cz/~zakkr/

C, PostgreSQL, PHP, WWW, http://docs.linux.cz, http://mape.jcu.cz

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Marc G. Fournier 2002-06-11 09:36:34 Re: Project scheduling issues (was Re: Per tuple overhead,
Previous Message Marc G. Fournier 2002-06-11 09:30:39 Re: Project scheduling issues (was Re: Per tuple overhead,