diff --git a/src/include/c.h b/src/include/c.h index 7752e1ae02..b7a1e11268 100644 --- a/src/include/c.h +++ b/src/include/c.h @@ -12,7 +12,7 @@ * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/c.h,v 1.188 2005/07/18 15:53:28 tgl Exp $ + * $PostgreSQL: pgsql/src/include/c.h,v 1.189 2005/07/21 15:16:27 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -630,6 +630,7 @@ typedef NameData *Name; #define MemSet(start, val, len) \ do \ { \ + /* must be void* because we don't know if it is integer aligned yet */ \ void *_vstart = (void *) (start); \ int _val = (val); \ Size _len = (len); \ diff --git a/src/include/utils/timestamp.h b/src/include/utils/timestamp.h index ae2ef56e0e..35221d5f1d 100644 --- a/src/include/utils/timestamp.h +++ b/src/include/utils/timestamp.h @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/utils/timestamp.h,v 1.49 2005/07/21 04:48:42 momjian Exp $ + * $PostgreSQL: pgsql/src/include/utils/timestamp.h,v 1.50 2005/07/21 15:16:27 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -63,6 +63,12 @@ typedef struct /* in both timestamp.h and ecpg/dt.h */ #define DAYS_PER_YEAR 365.25 /* assumes leap year every four years */ #define MONTHS_PER_YEAR 12 +/* + * DAYS_PER_MONTH is very imprecise. The more accurate value is + * 365.25/12 = 30.4375, or '30 days 10:30:00'. Right now we only + * return an integral number of days, but someday perhaps we should + * also return a 'time' value to be used as well. + */ #define DAYS_PER_MONTH 30 /* assumes exactly 30 days per month */ #define HOURS_PER_DAY 24 /* assume no daylight savings time changes */ diff --git a/src/interfaces/ecpg/pgtypeslib/dt.h b/src/interfaces/ecpg/pgtypeslib/dt.h index 14fbd3c987..01b44fb27a 100644 --- a/src/interfaces/ecpg/pgtypeslib/dt.h +++ b/src/interfaces/ecpg/pgtypeslib/dt.h @@ -219,6 +219,12 @@ do { \ /* in both timestamp.h and ecpg/dt.h */ #define DAYS_PER_YEAR 365.25 /* assumes leap year every four years */ #define MONTHS_PER_YEAR 12 +/* + * DAYS_PER_MONTH is very imprecise. The more accurate value is + * 365.25/12 = 30.4375, or '30 days 10:30:00'. Right now we only + * return an integral number of days, but someday perhaps we should + * also return a 'time' value to be used as well. + */ #define DAYS_PER_MONTH 30 /* assumes exactly 30 days per month */ #define HOURS_PER_DAY 24 /* assume no daylight savings time changes */