Re: BUG #4918: Weird input syntax for intervals

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Frank Spies" <frank(dot)spies(at)biotronik(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #4918: Weird input syntax for intervals
Date: 2009-07-13 18:57:02
Message-ID: 27901.1247511422@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"Frank Spies" <frank(dot)spies(at)biotronik(dot)com> writes:
> It feels totally weird that the two queries
> 1) select interval '13 month'
> 2) select interval '13' month
> do not have the same result: result for 1) is "1 year 1 mon", result for 2
> is "1 mon". Is this correct behaviour?

$ psql
psql (8.4.0)
Type "help" for help.

regression=# select interval '13 month';
interval
--------------
1 year 1 mon
(1 row)

regression=# select interval '13' month;
interval
--------------
1 year 1 mon
(1 row)

You sure you are on 8.4.0? We were fooling with the interval input code
quite late in 8.4 beta.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Peter Eisentraut 2009-07-13 22:18:55 Re: BUG #4914: uuid_generate_v4 not present in eithersource or yum/rpm
Previous Message Tom Lane 2009-07-13 18:30:14 Re: BUG #4890: Allow insert character has no equivalent in "LATIN2"