Re: date - date returns integer? - Mailing list pgsql-sql

From Tom Lane
Subject Re: date - date returns integer?
Date
Msg-id 14000.1109997380@sss.pgh.pa.us
Whole thread Raw
In response to date - date returns integer?  (Andrew Hammond <ahammond@ca.afilias.info>)
List pgsql-sql
Andrew Hammond <ahammond@ca.afilias.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


pgsql-sql by date:

Previous
From: Bret Hughes
Date:
Subject: Re: definative way to place secs from epoc into timestamp
Next
From: Tom Lane
Date:
Subject: Re: truncating table permissions