date + interval year - why is the return type convered to a timestamp?

From: the6campbells <the6campbells(at)gmail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: date + interval year - why is the return type convered to a timestamp?
Date: 2009-10-22 21:04:50
Message-ID: 22431f1b0910221404i52040b19s7c89f6dda4ae187d@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Why is Postgres returning a timestamp instead of the expected date data type
for the first expression (the second returns a date)?

In other words, is this a known bug or is it design intent. The manuals did
not seem to appear to say this is intentional behaviour but is not SQL
standard.

select date '2001-03-30' - interval '1' year, date '2001-03-30' - integer
'365' from tversion

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2009-10-22 23:13:58 Re: question about timestamp with tz
Previous Message the6campbells 2009-10-22 20:41:20 question about timestamp with tz