File tree Expand file tree Collapse file tree 3 files changed +15
-2
lines changed
interfaces/ecpg/pgtypeslib Expand file tree Collapse file tree 3 files changed +15
-2
lines changed Original file line number Diff line number Diff line change 12
12
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
13
13
* Portions Copyright (c) 1994, Regents of the University of California
14
14
*
15
- * $PostgreSQL: pgsql/src/include/c.h,v 1.188 2005/07/18 15:53:28 tgl Exp $
15
+ * $PostgreSQL: pgsql/src/include/c.h,v 1.189 2005/07/21 15:16:27 momjian Exp $
16
16
*
17
17
*-------------------------------------------------------------------------
18
18
*/
@@ -630,6 +630,7 @@ typedef NameData *Name;
630
630
#define MemSet (start , val , len ) \
631
631
do \
632
632
{ \
633
+ /* must be void* because we don't know if it is integer aligned yet */ \
633
634
void *_vstart = (void *) (start); \
634
635
int _val = (val); \
635
636
Size _len = (len); \
Original file line number Diff line number Diff line change 6
6
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
7
7
* Portions Copyright (c) 1994, Regents of the University of California
8
8
*
9
- * $PostgreSQL: pgsql/src/include/utils/timestamp.h,v 1.49 2005/07/21 04:48:42 momjian Exp $
9
+ * $PostgreSQL: pgsql/src/include/utils/timestamp.h,v 1.50 2005/07/21 15:16:27 momjian Exp $
10
10
*
11
11
*-------------------------------------------------------------------------
12
12
*/
@@ -63,6 +63,12 @@ typedef struct
63
63
/* in both timestamp.h and ecpg/dt.h */
64
64
#define DAYS_PER_YEAR 365.25 /* assumes leap year every four years */
65
65
#define MONTHS_PER_YEAR 12
66
+ /*
67
+ * DAYS_PER_MONTH is very imprecise. The more accurate value is
68
+ * 365.25/12 = 30.4375, or '30 days 10:30:00'. Right now we only
69
+ * return an integral number of days, but someday perhaps we should
70
+ * also return a 'time' value to be used as well.
71
+ */
66
72
#define DAYS_PER_MONTH 30 /* assumes exactly 30 days per month */
67
73
#define HOURS_PER_DAY 24 /* assume no daylight savings time changes */
68
74
Original file line number Diff line number Diff line change @@ -219,6 +219,12 @@ do { \
219
219
/* in both timestamp.h and ecpg/dt.h */
220
220
#define DAYS_PER_YEAR 365.25 /* assumes leap year every four years */
221
221
#define MONTHS_PER_YEAR 12
222
+ /*
223
+ * DAYS_PER_MONTH is very imprecise. The more accurate value is
224
+ * 365.25/12 = 30.4375, or '30 days 10:30:00'. Right now we only
225
+ * return an integral number of days, but someday perhaps we should
226
+ * also return a 'time' value to be used as well.
227
+ */
222
228
#define DAYS_PER_MONTH 30 /* assumes exactly 30 days per month */
223
229
#define HOURS_PER_DAY 24 /* assume no daylight savings time changes */
224
230
You can’t perform that action at this time.
0 commit comments