Re: Problem with intervals

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bob Smith <bsmith(at)h-e(dot)com>
Cc: pgsql-sql <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Problem with intervals
Date: 2003-12-02 14:51:00
Message-ID: 12448.1070376660@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Bob Smith <bsmith(at)h-e(dot)com> writes:
> '1 day' just means '24 hours'

Yup.

> Is this a Postgres bug, or is this correct SQL behavior?

It's arguably a bug, but it's unfixable without a significant change in
the internal representation and handling of intervals. I don't know
when anyone will get annoyed enough to tackle it. In the meantime,
consider using date +/- integer arithmetic instead of timestamp + interval.

> I'm running Postgres 7.2.2.

You really should be running something newer ...

regards, tom lane

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Stephan Szabo 2003-12-02 16:15:24 Re: Validity check in to_date?
Previous Message Alexander M. Pravking 2003-12-02 11:53:48 Re: Problem with intervals