Re: interval typmodout is broken
От
Bruce Momjian
Тема
Re: interval typmodout is broken
Дата
Msg-id
20141018143122.GB16974@momjian.us
Ответ на
Re: interval typmodout is broken (Bruce Momjian)
Список
Дерево обсуждения
interval typmodout is broken Alvaro Herrera <alvherre@2ndquadrant.com>
Re: interval typmodout is broken Tom Lane <tgl@sss.pgh.pa.us>
Re: interval typmodout is broken Alvaro Herrera <alvherre@2ndquadrant.com>
Re: interval typmodout is broken Tom Lane <tgl@sss.pgh.pa.us>
Re: interval typmodout is broken Bruce Momjian <bruce@momjian.us>
Re: interval typmodout is broken Bruce Momjian <bruce@momjian.us>
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 http://momjian.us EnterpriseDB http://enterprisedb.com + Everyone has their own god. +
В списке pgsql-hackers по дате отправления
От: Marko Tiikkaja
Дата: