On 7 Apr 2003 at 10:32, Tom Lane wrote:
> "Dan Langille" <dan@langille.org> writes:
> > Yes, as hinted in the message subject. Hmmm, so that's how it's
> > doing the math. I would think '24 hours' would give a different
> > answer to '1 day' since '1 day' is not necessarily == '24 hours'.
>
> Type INTERVAL knows about months and seconds, nothing else.
Hmmm, months and seconds only. Then is the documentation wrong?
5.5.1.4. Intervals
interval values can be written with the following syntax:
Quantity Unit [Quantity Unit...] [Direction]
@ Quantity Unit [Quantity Unit...] [Direction]
where: Quantity is a number (possibly signed), Unit is second,
minute, hour, day, week, month, year, decade, century, millennium, or
abbreviations or plurals of these units; Direction can be ago or
empty. The at sign (@) is optional noise. The amounts of different
units are implicitly added up with appropriate sign accounting.
As found at:
http://www.postgresql.org/docs/view.php?version=7.3&idoc=0&file=dataty
pe-datetime.html
> I've opined in the past that it should be months, days, and seconds,
> but no one seems excited enough about the issue to do the nontrivial
> work involved ...
If it truly is that trivial, please point me at the file I need to
hack.
--
Dan Langille : http://www.langille.org/