pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bob Smith <bsmith@h-e.com>
Cc: pgsql-sql <pgsql-sql@postgresql.org>
Subject: Re: Problem with intervals
Date: Tue, 02 Dec 2003 09:51:00 -0500
Message-ID: <12448.1070376660@sss.pgh.pa.us> (raw)
In-Reply-To: <AFC6FD04-2485-11D8-A180-0003933DD370@h-e.com>
References: <AFC6FD04-2485-11D8-A180-0003933DD370@h-e.com>

Bob Smith <bsmith@h-e.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



view thread (5+ messages)  latest in thread

Message-ID: <12448.1070376660@sss.pgh.pa.us>
Permalink:  ../12448.1070376660@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/12448.1070376660@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, bsmith@h-e.com
  Subject: Re: Problem with intervals
  In-Reply-To: <12448.1070376660@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox