pgsql: Attached is the new patch.

From: momjian(at)postgresql(dot)org (Bruce Momjian)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Attached is the new patch.
Date: 2006-03-06 22:49:17
Message-ID: 20060306224917.C419D9DC872@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
Attached is the new patch. To summarize:

- new function justify_interval(interval)
- modified function justify_hours(interval)
- modified function justify_days(interval)

These functions are defined to meet the requirements as discussed in
this thread. Specifically:

- justify_hours makes certain the sign bit on the hours
matches the sign bit on the days. It only checks the
sign bit on the days, and not the months, when
determining if the hours should be positive or negative.
After the call, -24 < hours < 24.

- justify_days makes certain the sign bit on the days
matches the sign bit on the months. It's behavior does
not depend on the hours, nor does it modify the hours.
After the call, -30 < days < 30.

- justify_interval makes sure the sign bits on all three
fields months, days, and hours are all the same. After
the call, -24 < hours < 24 AND -30 < days < 30.

Mark Dilger

Modified Files:
--------------
pgsql/doc/src/sgml:
func.sgml (r1.309 -> r1.310)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/func.sgml.diff?r1=1.309&r2=1.310)
pgsql/src/backend/utils/adt:
timestamp.c (r1.161 -> r1.162)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/timestamp.c.diff?r1=1.161&r2=1.162)
pgsql/src/include/catalog:
catversion.h (r1.318 -> r1.319)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/catalog/catversion.h.diff?r1=1.318&r2=1.319)
pg_proc.h (r1.400 -> r1.401)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/catalog/pg_proc.h.diff?r1=1.400&r2=1.401)
pgsql/src/include/utils:
timestamp.h (r1.58 -> r1.59)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/utils/timestamp.h.diff?r1=1.58&r2=1.59)
pgsql/src/test/regress/expected:
interval.out (r1.14 -> r1.15)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/expected/interval.out.diff?r1=1.14&r2=1.15)
pgsql/src/test/regress/sql:
interval.sql (r1.8 -> r1.9)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/test/regress/sql/interval.sql.diff?r1=1.8&r2=1.9)

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2006-03-06 22:51:20 pgsql: Done though the second is default so off in 8.2: > * -Eventually
Previous Message Bruce Momjian 2006-03-06 19:49:21 pgsql: Enable standard_conforming_strings to be turned on.