pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PFC <lists@peufeu.com>
To: pgsql-sql@postgresql.org
Subject: Re: [HACKERS] Interval subtracting
Date: Wed, 08 Mar 2006 22:23:05 +0100
Message-ID: <op.s535oruacigqcu@apollo13> (raw)
In-Reply-To: <1141832866.6249.7.camel@state.g2switchworks.com>
References: <200603012027.k21KRk423759@candle.pha.pa.us>
	<1141245396.18820.16.camel@state.g2switchworks.com>
	<440EC8FF.9080201@logix-tt.com>
	<1141832866.6249.7.camel@state.g2switchworks.com>


> For same reasons, i.e. a need for precision, I find it hard to accept
> the idea of mixing positive and negative units in the same interval.
> The plus or minus sign should be outside of the interval.

	The interval data type is really useful. I see no reason to restrict its  
usefulness with an arbitrary constraint. Date arithmetic is treacherous  
and INTERVAL is a lifesaver.

	Forcing a global sign on the interval would break interval arithmetic.
	How would you compute '1 month'::interval - '1 week'::interval ?



view thread (62+ messages)

Message-ID: <op.s535oruacigqcu@apollo13>
Permalink:  ../op.s535oruacigqcu@apollo13/
Also on:    postgresql.org/message-id/op.s535oruacigqcu@apollo13

 · 

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: lists@peufeu.com
  Subject: Re: [HACKERS] Interval subtracting
  In-Reply-To: <op.s535oruacigqcu@apollo13>

* 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