Re: date - date returns integer?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Hammond <ahammond(at)ca(dot)afilias(dot)info>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: date - date returns integer?
Date: 2005-03-05 04:36:20
Message-ID: 14000.1109997380@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Andrew Hammond <ahammond(at)ca(dot)afilias(dot)info> writes:
> Should date - date return type integer, not interval?

If we made it return interval then there would be all sorts of timezone
dependencies introduced (think about DST crossings) ... which is
generally something you don't want to think about when doing date
arithmetic. I think the definitions of these operators are fine.

regards, tom lane

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2005-03-05 05:02:19 Re: truncating table permissions
Previous Message Bret Hughes 2005-03-05 03:39:25 Re: definative way to place secs from epoc into timestamp