Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0828204

Browse files
author
Thomas G. Lockhart
committed
Enable new date and time definitions to allow Solaris and Irix -O2 compilation.
Move date and time field type labels to less than 32 to allow use as masks.
1 parentd865228 commit0828204

File tree

1 file changed

+21
-20
lines changed
  • src/include/utils

1 file changed

+21
-20
lines changed

‎src/include/utils/dt.h

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
* Copyright (c) 1994, Regents of the University of California
1010
*
11-
* $Id: dt.h,v 1.8 1997/05/11 15:13:49 thomas Exp $
11+
* $Id: dt.h,v 1.9 1997/05/23 05:10:03 thomas Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -39,11 +39,10 @@ typedef struct {
3939
/*
4040
* USE_NEW_DATE enables a more efficient Julian day-based date type.
4141
* USE_NEW_TIME enables a more efficient double-based time type.
42-
* These have been tested in v6.1beta, but only by myself.
43-
* These should be enabled for Postgres v7.0 - tgl 97/04/02
4442
*/
45-
#defineUSE_NEW_DATE0
46-
#defineUSE_NEW_TIME0
43+
44+
#defineUSE_NEW_DATE1
45+
#defineUSE_NEW_TIME1
4746

4847

4948
/* ----------------------------------------------------------------
@@ -130,6 +129,8 @@ typedef struct {
130129
* Token field definitions for time parsing and decoding.
131130
* These need to fit into the datetkn table type.
132131
* At the moment, that means keep them within [-127,127].
132+
* These are also used for bit masks in DecodeDateDelta()
133+
* so actually restrict them to within [0,31] for now.
133134
*/
134135

135136
#defineDTK_NUMBER0
@@ -152,21 +153,21 @@ typedef struct {
152153
#defineDTK_TOMORROW15
153154
#defineDTK_ZULU16
154155

155-
#defineDTK_DELTA32
156-
#defineDTK_SECOND33
157-
#defineDTK_MINUTE34
158-
#defineDTK_HOUR35
159-
#defineDTK_DAY36
160-
#defineDTK_WEEK37
161-
#defineDTK_MONTH38
162-
#defineDTK_QUARTER39
163-
#defineDTK_YEAR40
164-
#defineDTK_DECADE41
165-
#defineDTK_CENTURY42
166-
#defineDTK_MILLENIUM43
167-
#defineDTK_MILLISEC44
168-
#defineDTK_MICROSEC45
169-
#defineDTK_AGO46
156+
#defineDTK_DELTA17
157+
#defineDTK_SECOND18
158+
#defineDTK_MINUTE19
159+
#defineDTK_HOUR20
160+
#defineDTK_DAY21
161+
#defineDTK_WEEK22
162+
#defineDTK_MONTH23
163+
#defineDTK_QUARTER24
164+
#defineDTK_YEAR25
165+
#defineDTK_DECADE26
166+
#defineDTK_CENTURY27
167+
#defineDTK_MILLENIUM28
168+
#defineDTK_MILLISEC29
169+
#defineDTK_MICROSEC30
170+
#defineDTK_AGO31
170171

171172
/*
172173
* Bit mask definitions for time parsing.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp