On Mon, Oct 13, 2014 at 07:38:39PM -0400, Bruce Momjian wrote:
> I think the basic problem is that the original author had the idea of
> doing:
> 
>       SELECT INTERVAL (2) '100.9999 seconds';
>        interval
>       ----------
>        00:01:41
> 
> and using (2) in that location as a short-hand when the interval
> precision units were not specified, which seems logical.  However, they
> allowed it even when the units were specified:
> 
>       SELECT INTERVAL (2) '100.9999 seconds' HOUR to SECOND;
>        interval
>       ----------
>        00:01:41
> 
> and in cases where the precision made no sense:
>       
>       SELECT INTERVAL (2) '100.9999 seconds' HOUR to MINUTE;
>        interval
>       ----------
>        00:01:00
> 
> I have created the attached patch which only allows parentheses in the
> first case.  

Patch applied.

-- 
  Bruce Momjian  <br...@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + Everyone has their own god. +


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to