pgsql: Properly round months into days and into seconds for interval

Started by Bruce Momjianalmost 20 years ago2 messagescomitters
Jump to latest
#1Bruce Momjian
bruce@momjian.us

Log Message:
-----------
Properly round months into days and into seconds for interval
multiplication/division queries like select '41 mon 10:00:00'::interval
/ 10 as "pos".

Report from Michael Glaesemann

Modified Files:
--------------
pgsql/src/backend/utils/adt:
timestamp.c (r1.165 -> r1.166)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/timestamp.c.diff?r1=1.165&r2=1.166)
pgsql/src/test/regress/expected:
interval.out (r1.15 -> r1.16)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/interval.out.diff?r1=1.15&r2=1.16)

#2Michael Glaesemann
grzm@seespotcode.net
In reply to: Bruce Momjian (#1)
Re: pgsql: Properly round months into days and into seconds for interval

On Sep 3, 2006, at 12:34 , Bruce Momjian wrote:

Log Message:
-----------
Properly round months into days and into seconds for interval
multiplication/division queries like select '41 mon
10:00:00'::interval
/ 10 as "pos".

Report from Michael Glaesemann

Actually it was reported by Michael Paesold

http://archives.postgresql.org/pgsql-hackers/2005-11/msg00254.php

I just attempted to fix it.

Michael Glaesemann
grzm seespotcode net