Re: BUG #4918: Weird input syntax for intervals - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #4918: Weird input syntax for intervals
Date
Msg-id 27901.1247511422@sss.pgh.pa.us
Whole thread Raw
In response to BUG #4918: Weird input syntax for intervals  ("Frank Spies" <frank.spies@biotronik.com>)
Responses Re: BUG #4918: Weird input syntax for intervals
Re: BUG #4918: Weird input syntax for intervals
List pgsql-bugs
"Frank Spies" <frank.spies@biotronik.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

pgsql-bugs by date:

Previous
From: "Frank Spies"
Date:
Subject: BUG #4918: Weird input syntax for intervals
Next
From: Peter Eisentraut
Date:
Subject: Re: BUG #4914: uuid_generate_v4 not present in eithersource or yum/rpm