Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
791c0758
Commit
791c0758
authored
Mar 14, 1997
by
Marc G. Fournier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Date/Time updates from Thomas...
parent
53d8be3b
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
472 additions
and
223 deletions
+472
-223
src/include/postgres.h
src/include/postgres.h
+7
-6
src/include/utils/builtins.h
src/include/utils/builtins.h
+164
-140
src/include/utils/datetime.h
src/include/utils/datetime.h
+19
-1
src/include/utils/dt.h
src/include/utils/dt.h
+235
-0
src/include/utils/geo_decls.h
src/include/utils/geo_decls.h
+4
-4
src/include/utils/nabstime.h
src/include/utils/nabstime.h
+37
-66
src/interfaces/libpq/Makefile
src/interfaces/libpq/Makefile
+4
-4
src/test/regress/regress.c
src/test/regress/regress.c
+2
-2
No files found.
src/include/postgres.h
View file @
791c0758
...
...
@@ -6,7 +6,7 @@
*
* Copyright (c) 1995, Regents of the University of California
*
* $Id: postgres.h,v 1.
3 1996/12/10 07:03:40 bryanh
Exp $
* $Id: postgres.h,v 1.
4 1997/03/14 23:31:22 scrappy
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -29,7 +29,7 @@
* 2) varlena and array types
* 3) TransactionId and CommandId
* 4) genbki macros used by catalog/pg_xxx.h files
* 5) random SIGNBIT, MAXPGPATH, STATUS macros
* 5) random
C
SIGNBIT, MAXPGPATH, STATUS macros
*
* ----------------------------------------------------------------
*/
...
...
@@ -52,7 +52,7 @@ typedef int32 int4;
typedef
float
float4
;
typedef
double
float8
;
typedef
int4
aclitem
;
typedef
int4
aclitem
;
#define InvalidOid 0
#define OidIsValid(objectId) ((bool) (objectId != InvalidOid))
...
...
@@ -177,15 +177,16 @@ typedef uint16 CommandId;
/* ----------------------------------------------------------------
* Section 5: random stuff
* SIGNBIT, MAXPGPATH, STATUS...
*
C
SIGNBIT, MAXPGPATH, STATUS...
* ----------------------------------------------------------------
*/
/* msb for int/unsigned */
#define SIGNBIT (0x8000)
#define ISIGNBIT (0x80000000)
#define WSIGNBIT (0x8000)
/* msb for char */
#define CSIGNBIT (
1 << 7
)
#define CSIGNBIT (
0x80
)
/* ----------------
* global variables which should probably go someplace else.
...
...
src/include/utils/builtins.h
View file @
791c0758
...
...
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: builtins.h,v 1.1
1 1997/03/12 21:28:14
scrappy Exp $
* $Id: builtins.h,v 1.1
2 1997/03/14 23:33:18
scrappy Exp $
*
* NOTES
* This should normally only be included by fmgr.h.
...
...
@@ -19,7 +19,7 @@
#define BUILTINS_H
#include <storage/itemptr.h>
#include <utils/geo
-
decls.h>
#include <utils/geo
_
decls.h>
#include <utils/datetime.h>
#include <utils/nabstime.h>
#include <utils/rel.h>
...
...
@@ -28,10 +28,10 @@
* Defined in adt/
*/
/* bool.c */
extern
int32
boolin
(
char
*
b
);
extern
bool
boolin
(
char
*
b
);
extern
char
*
boolout
(
long
b
);
extern
int32
booleq
(
int8
arg1
,
int8
arg2
);
extern
int32
boolne
(
int8
arg1
,
int8
arg2
);
extern
bool
booleq
(
int8
arg1
,
int8
arg2
);
extern
bool
boolne
(
int8
arg1
,
int8
arg2
);
/* char.c */
extern
int32
charin
(
char
*
ch
);
...
...
@@ -40,49 +40,49 @@ extern int32 cidin(char *s);
extern
char
*
cidout
(
int32
c
);
extern
char
*
char16in
(
char
*
s
);
extern
char
*
char16out
(
char
*
s
);
extern
int32
chareq
(
int8
arg1
,
int8
arg2
);
extern
int32
charne
(
int8
arg1
,
int8
arg2
);
extern
int32
charlt
(
int8
arg1
,
int8
arg2
);
extern
int32
charle
(
int8
arg1
,
int8
arg2
);
extern
int32
chargt
(
int8
arg1
,
int8
arg2
);
extern
int32
charge
(
int8
arg1
,
int8
arg2
);
extern
bool
chareq
(
int8
arg1
,
int8
arg2
);
extern
bool
charne
(
int8
arg1
,
int8
arg2
);
extern
bool
charlt
(
int8
arg1
,
int8
arg2
);
extern
bool
charle
(
int8
arg1
,
int8
arg2
);
extern
bool
chargt
(
int8
arg1
,
int8
arg2
);
extern
bool
charge
(
int8
arg1
,
int8
arg2
);
extern
int8
charpl
(
int8
arg1
,
int8
arg2
);
extern
int8
charmi
(
int8
arg1
,
int8
arg2
);
extern
int8
charmul
(
int8
arg1
,
int8
arg2
);
extern
int8
chardiv
(
int8
arg1
,
int8
arg2
);
extern
int32
cideq
(
int8
arg1
,
int8
arg2
);
extern
int32
char16eq
(
char
*
arg1
,
char
*
arg2
);
extern
int32
char16ne
(
char
*
arg1
,
char
*
arg2
);
extern
int32
char16lt
(
char
*
arg1
,
char
*
arg2
);
extern
int32
char16le
(
char
*
arg1
,
char
*
arg2
);
extern
int32
char16gt
(
char
*
arg1
,
char
*
arg2
);
extern
int32
char16ge
(
char
*
arg1
,
char
*
arg2
);
extern
bool
cideq
(
int8
arg1
,
int8
arg2
);
extern
bool
char16eq
(
char
*
arg1
,
char
*
arg2
);
extern
bool
char16ne
(
char
*
arg1
,
char
*
arg2
);
extern
bool
char16lt
(
char
*
arg1
,
char
*
arg2
);
extern
bool
char16le
(
char
*
arg1
,
char
*
arg2
);
extern
bool
char16gt
(
char
*
arg1
,
char
*
arg2
);
extern
bool
char16ge
(
char
*
arg1
,
char
*
arg2
);
extern
uint16
char2in
(
char
*
s
);
extern
char
*
char2out
(
uint16
s
);
extern
int32
char2eq
(
uint16
a
,
uint16
b
);
extern
int32
char2ne
(
uint16
a
,
uint16
b
);
extern
int32
char2lt
(
uint16
a
,
uint16
b
);
extern
int32
char2le
(
uint16
a
,
uint16
b
);
extern
int32
char2gt
(
uint16
a
,
uint16
b
);
extern
int32
char2ge
(
uint16
a
,
uint16
b
);
extern
bool
char2eq
(
uint16
a
,
uint16
b
);
extern
bool
char2ne
(
uint16
a
,
uint16
b
);
extern
bool
char2lt
(
uint16
a
,
uint16
b
);
extern
bool
char2le
(
uint16
a
,
uint16
b
);
extern
bool
char2gt
(
uint16
a
,
uint16
b
);
extern
bool
char2ge
(
uint16
a
,
uint16
b
);
extern
int32
char2cmp
(
uint16
a
,
uint16
b
);
extern
uint32
char4in
(
char
*
s
);
extern
char
*
char4out
(
uint32
s
);
extern
int32
char4eq
(
uint32
a
,
uint32
b
);
extern
int32
char4ne
(
uint32
a
,
uint32
b
);
extern
int32
char4lt
(
uint32
a
,
uint32
b
);
extern
int32
char4le
(
uint32
a
,
uint32
b
);
extern
int32
char4gt
(
uint32
a
,
uint32
b
);
extern
int32
char4ge
(
uint32
a
,
uint32
b
);
extern
bool
char4eq
(
uint32
a
,
uint32
b
);
extern
bool
char4ne
(
uint32
a
,
uint32
b
);
extern
bool
char4lt
(
uint32
a
,
uint32
b
);
extern
bool
char4le
(
uint32
a
,
uint32
b
);
extern
bool
char4gt
(
uint32
a
,
uint32
b
);
extern
bool
char4ge
(
uint32
a
,
uint32
b
);
extern
int32
char4cmp
(
uint32
a
,
uint32
b
);
extern
char
*
char8in
(
char
*
s
);
extern
char
*
char8out
(
char
*
s
);
extern
int32
char8eq
(
char
*
arg1
,
char
*
arg2
);
extern
int32
char8ne
(
char
*
arg1
,
char
*
arg2
);
extern
int32
char8lt
(
char
*
arg1
,
char
*
arg2
);
extern
int32
char8le
(
char
*
arg1
,
char
*
arg2
);
extern
int32
char8gt
(
char
*
arg1
,
char
*
arg2
);
extern
int32
char8ge
(
char
*
arg1
,
char
*
arg2
);
extern
bool
char8eq
(
char
*
arg1
,
char
*
arg2
);
extern
bool
char8ne
(
char
*
arg1
,
char
*
arg2
);
extern
bool
char8lt
(
char
*
arg1
,
char
*
arg2
);
extern
bool
char8le
(
char
*
arg1
,
char
*
arg2
);
extern
bool
char8gt
(
char
*
arg1
,
char
*
arg2
);
extern
bool
char8ge
(
char
*
arg1
,
char
*
arg2
);
extern
int32
char8cmp
(
char
*
arg1
,
char
*
arg2
);
/* int.c */
...
...
@@ -96,31 +96,31 @@ extern int32 int4in(char *num);
extern
char
*
int4out
(
int32
l
);
extern
int32
i2toi4
(
int16
arg1
);
extern
int16
i4toi2
(
int32
arg1
);
extern
int32
int4eq
(
int32
arg1
,
int32
arg2
);
extern
int32
int4ne
(
int32
arg1
,
int32
arg2
);
extern
int32
int4lt
(
int32
arg1
,
int32
arg2
);
extern
int32
int4le
(
int32
arg1
,
int32
arg2
);
extern
int32
int4gt
(
int32
arg1
,
int32
arg2
);
extern
int32
int4ge
(
int32
arg1
,
int32
arg2
);
extern
int32
int2eq
(
int16
arg1
,
int16
arg2
);
extern
int32
int2ne
(
int16
arg1
,
int16
arg2
);
extern
int32
int2lt
(
int16
arg1
,
int16
arg2
);
extern
int32
int2le
(
int16
arg1
,
int16
arg2
);
extern
int32
int2gt
(
int16
arg1
,
int16
arg2
);
extern
int32
int2ge
(
int16
arg1
,
int16
arg2
);
extern
int32
int24eq
(
int32
arg1
,
int32
arg2
);
extern
int32
int24ne
(
int32
arg1
,
int32
arg2
);
extern
int32
int24lt
(
int32
arg1
,
int32
arg2
);
extern
int32
int24le
(
int32
arg1
,
int32
arg2
);
extern
int32
int24gt
(
int32
arg1
,
int32
arg2
);
extern
int32
int24ge
(
int32
arg1
,
int32
arg2
);
extern
int32
int42eq
(
int32
arg1
,
int32
arg2
);
extern
int32
int42ne
(
int32
arg1
,
int32
arg2
);
extern
int32
int42lt
(
int32
arg1
,
int32
arg2
);
extern
int32
int42le
(
int32
arg1
,
int32
arg2
);
extern
int32
int42gt
(
int32
arg1
,
int32
arg2
);
extern
int32
int42ge
(
int32
arg1
,
int32
arg2
);
extern
int32
keyfirsteq
(
int16
*
arg1
,
int16
arg2
);
extern
bool
int4eq
(
int32
arg1
,
int32
arg2
);
extern
bool
int4ne
(
int32
arg1
,
int32
arg2
);
extern
bool
int4lt
(
int32
arg1
,
int32
arg2
);
extern
bool
int4le
(
int32
arg1
,
int32
arg2
);
extern
bool
int4gt
(
int32
arg1
,
int32
arg2
);
extern
bool
int4ge
(
int32
arg1
,
int32
arg2
);
extern
bool
int2eq
(
int16
arg1
,
int16
arg2
);
extern
bool
int2ne
(
int16
arg1
,
int16
arg2
);
extern
bool
int2lt
(
int16
arg1
,
int16
arg2
);
extern
bool
int2le
(
int16
arg1
,
int16
arg2
);
extern
bool
int2gt
(
int16
arg1
,
int16
arg2
);
extern
bool
int2ge
(
int16
arg1
,
int16
arg2
);
extern
bool
int24eq
(
int32
arg1
,
int32
arg2
);
extern
bool
int24ne
(
int32
arg1
,
int32
arg2
);
extern
bool
int24lt
(
int32
arg1
,
int32
arg2
);
extern
bool
int24le
(
int32
arg1
,
int32
arg2
);
extern
bool
int24gt
(
int32
arg1
,
int32
arg2
);
extern
bool
int24ge
(
int32
arg1
,
int32
arg2
);
extern
bool
int42eq
(
int32
arg1
,
int32
arg2
);
extern
bool
int42ne
(
int32
arg1
,
int32
arg2
);
extern
bool
int42lt
(
int32
arg1
,
int32
arg2
);
extern
bool
int42le
(
int32
arg1
,
int32
arg2
);
extern
bool
int42gt
(
int32
arg1
,
int32
arg2
);
extern
bool
int42ge
(
int32
arg1
,
int32
arg2
);
extern
bool
keyfirsteq
(
int16
*
arg1
,
int16
arg2
);
extern
int32
int4um
(
int32
arg
);
extern
int32
int4pl
(
int32
arg1
,
int32
arg2
);
extern
int32
int4mi
(
int32
arg1
,
int32
arg2
);
...
...
@@ -155,12 +155,12 @@ extern int32 int4smaller(int32 arg1, int32 arg2);
/* name.c */
extern
NameData
*
namein
(
char
*
s
);
extern
char
*
nameout
(
NameData
*
s
);
extern
int32
nameeq
(
NameData
*
arg1
,
NameData
*
arg2
);
extern
int32
namene
(
NameData
*
arg1
,
NameData
*
arg2
);
extern
int32
namelt
(
NameData
*
arg1
,
NameData
*
arg2
);
extern
int32
namele
(
NameData
*
arg1
,
NameData
*
arg2
);
extern
int32
namegt
(
NameData
*
arg1
,
NameData
*
arg2
);
extern
int32
namege
(
NameData
*
arg1
,
NameData
*
arg2
);
extern
bool
nameeq
(
NameData
*
arg1
,
NameData
*
arg2
);
extern
bool
namene
(
NameData
*
arg1
,
NameData
*
arg2
);
extern
bool
namelt
(
NameData
*
arg1
,
NameData
*
arg2
);
extern
bool
namele
(
NameData
*
arg1
,
NameData
*
arg2
);
extern
bool
namegt
(
NameData
*
arg1
,
NameData
*
arg2
);
extern
bool
namege
(
NameData
*
arg1
,
NameData
*
arg2
);
extern
int
namecmp
(
Name
n1
,
Name
n2
);
extern
int
namecpy
(
Name
n1
,
Name
n2
);
extern
int
namecat
(
Name
n1
,
Name
n2
);
...
...
@@ -184,28 +184,28 @@ extern int atof1(char *str, double *val);
* Per-opclass comparison functions for new btrees. These are
* stored in pg_amproc and defined in nbtree/
*/
extern
int32
btint2cmp
(
int16
a
,
int16
b
);
extern
int32
btint4cmp
(
int32
a
,
int32
b
);
extern
int32
btint24cmp
(
int16
a
,
int32
b
);
extern
int32
btint42cmp
(
int32
a
,
int16
b
);
extern
int32
btfloat4cmp
(
float32
a
,
float32
b
);
extern
int32
btfloat8cmp
(
float64
a
,
float64
b
);
extern
int32
btoidcmp
(
Oid
a
,
Oid
b
);
extern
int32
btabstimecmp
(
AbsoluteTime
a
,
AbsoluteTime
b
);
extern
int32
btcharcmp
(
char
a
,
char
b
);
extern
int32
btchar2cmp
(
uint16
a
,
uint16
b
);
extern
int32
btchar4cmp
(
uint32
a
,
uint32
b
);
extern
int32
btchar8cmp
(
char
*
a
,
char
*
b
);
extern
int32
btchar16cmp
(
char
*
a
,
char
*
b
);
extern
int32
btnamecmp
(
NameData
*
a
,
NameData
*
b
);
extern
int32
bttextcmp
(
struct
varlena
*
a
,
struct
varlena
*
b
);
extern
int32
btint2cmp
(
int16
a
,
int16
b
);
extern
int32
btint4cmp
(
int32
a
,
int32
b
);
extern
int32
btint24cmp
(
int16
a
,
int32
b
);
extern
int32
btint42cmp
(
int32
a
,
int16
b
);
extern
int32
btfloat4cmp
(
float32
a
,
float32
b
);
extern
int32
btfloat8cmp
(
float64
a
,
float64
b
);
extern
int32
btoidcmp
(
Oid
a
,
Oid
b
);
extern
int32
btabstimecmp
(
AbsoluteTime
a
,
AbsoluteTime
b
);
extern
int32
btcharcmp
(
char
a
,
char
b
);
extern
int32
btchar2cmp
(
uint16
a
,
uint16
b
);
extern
int32
btchar4cmp
(
uint32
a
,
uint32
b
);
extern
int32
btchar8cmp
(
char
*
a
,
char
*
b
);
extern
int32
btchar16cmp
(
char
*
a
,
char
*
b
);
extern
int32
btnamecmp
(
NameData
*
a
,
NameData
*
b
);
extern
int32
bttextcmp
(
struct
varlena
*
a
,
struct
varlena
*
b
);
/* support routines for the rtree access method, by opclass */
extern
BOX
*
rt_box_union
(
BOX
*
a
,
BOX
*
b
);
extern
BOX
*
rt_box_inter
(
BOX
*
a
,
BOX
*
b
);
extern
void
rt_box_size
(
BOX
*
a
,
float
*
size
);
extern
void
rt_bigbox_size
(
BOX
*
a
,
float
*
size
);
extern
void
rt_poly_size
(
POLYGON
*
a
,
float
*
size
);
extern
BOX
*
rt_box_union
(
BOX
*
a
,
BOX
*
b
);
extern
BOX
*
rt_box_inter
(
BOX
*
a
,
BOX
*
b
);
extern
void
rt_box_size
(
BOX
*
a
,
float
*
size
);
extern
void
rt_bigbox_size
(
BOX
*
a
,
float
*
size
);
extern
void
rt_poly_size
(
POLYGON
*
a
,
float
*
size
);
extern
POLYGON
*
rt_poly_union
(
POLYGON
*
a
,
POLYGON
*
b
);
extern
POLYGON
*
rt_poly_inter
(
POLYGON
*
a
,
POLYGON
*
b
);
...
...
@@ -231,29 +231,31 @@ extern AbsoluteTime timemi(AbsoluteTime t1, RelativeTime t2);
extern
int
ininterval
(
AbsoluteTime
t
,
TimeInterval
interval
);
extern
RelativeTime
intervalrel
(
TimeInterval
interval
);
extern
AbsoluteTime
timenow
(
void
);
extern
int32
reltimeeq
(
RelativeTime
t1
,
RelativeTime
t2
);
extern
int32
reltimene
(
RelativeTime
t1
,
RelativeTime
t2
);
extern
int32
reltimelt
(
RelativeTime
t1
,
RelativeTime
t2
);
extern
int32
reltimegt
(
RelativeTime
t1
,
RelativeTime
t2
);
extern
int32
reltimele
(
RelativeTime
t1
,
RelativeTime
t2
);
extern
int32
reltimege
(
RelativeTime
t1
,
RelativeTime
t2
);
extern
int32
intervaleq
(
TimeInterval
i1
,
TimeInterval
i2
);
extern
int32
intervalleneq
(
TimeInterval
i
,
RelativeTime
t
);
extern
int32
intervallenne
(
TimeInterval
i
,
RelativeTime
t
);
extern
int32
intervallenlt
(
TimeInterval
i
,
RelativeTime
t
);
extern
int32
intervallengt
(
TimeInterval
i
,
RelativeTime
t
);
extern
int32
intervallenle
(
TimeInterval
i
,
RelativeTime
t
);
extern
int32
intervallenge
(
TimeInterval
i
,
RelativeTime
t
);
extern
int32
intervalct
(
TimeInterval
i1
,
TimeInterval
i2
);
extern
int32
intervalov
(
TimeInterval
i1
,
TimeInterval
i2
);
extern
bool
reltimeeq
(
RelativeTime
t1
,
RelativeTime
t2
);
extern
bool
reltimene
(
RelativeTime
t1
,
RelativeTime
t2
);
extern
bool
reltimelt
(
RelativeTime
t1
,
RelativeTime
t2
);
extern
bool
reltimegt
(
RelativeTime
t1
,
RelativeTime
t2
);
extern
bool
reltimele
(
RelativeTime
t1
,
RelativeTime
t2
);
extern
bool
reltimege
(
RelativeTime
t1
,
RelativeTime
t2
);
extern
bool
intervaleq
(
TimeInterval
i1
,
TimeInterval
i2
);
extern
bool
intervalleneq
(
TimeInterval
i
,
RelativeTime
t
);
extern
bool
intervallenne
(
TimeInterval
i
,
RelativeTime
t
);
extern
bool
intervallenlt
(
TimeInterval
i
,
RelativeTime
t
);
extern
bool
intervallengt
(
TimeInterval
i
,
RelativeTime
t
);
extern
bool
intervallenle
(
TimeInterval
i
,
RelativeTime
t
);
extern
bool
intervallenge
(
TimeInterval
i
,
RelativeTime
t
);
extern
bool
intervalct
(
TimeInterval
i1
,
TimeInterval
i2
);
extern
bool
intervalov
(
TimeInterval
i1
,
TimeInterval
i2
);
extern
AbsoluteTime
intervalstart
(
TimeInterval
i
);
extern
AbsoluteTime
intervalend
(
TimeInterval
i
);
extern
int
isreltime
(
char
*
timestring
,
int
*
sign
,
long
*
quantity
,
int
*
unitnr
);
extern
text
*
timeofday
(
void
);
/* dt.c */
extern
int32
dtin
(
char
*
datetime
);
extern
char
*
dtout
(
int32
datetime
);
extern
DateTime
*
datetime_in
(
char
*
str
);
extern
char
*
datetime_out
(
DateTime
*
datetime
);
extern
TimeSpan
*
timespan_in
(
char
*
str
);
extern
char
*
timespan_out
(
TimeSpan
*
timespan
);
/* filename.c */
extern
char
*
filename_in
(
char
*
file
);
...
...
@@ -325,7 +327,7 @@ extern long float84le(float64 arg1, float32 arg2);
extern
long
float84gt
(
float64
arg1
,
float32
arg2
);
extern
long
float84ge
(
float64
arg1
,
float32
arg2
);
/* geo
-ops.c, geo-
selfuncs.c */
/* geo
_ops.c, geo_
selfuncs.c */
/* misc.c */
extern
bool
NullValue
(
Datum
value
,
bool
*
isNull
);
...
...
@@ -344,9 +346,9 @@ extern Oid *oid8in(char *oidString);
extern
char
*
oid8out
(
Oid
(
*
oidArray
)[]);
extern
Oid
oidin
(
char
*
s
);
extern
char
*
oidout
(
Oid
o
);
extern
int32
oideq
(
Oid
arg1
,
Oid
arg2
);
extern
int32
oidne
(
Oid
arg1
,
Oid
arg2
);
extern
int32
oid8eq
(
Oid
arg1
[],
Oid
arg2
[]);
extern
bool
oideq
(
Oid
arg1
,
Oid
arg2
);
extern
bool
oidne
(
Oid
arg1
,
Oid
arg2
);
extern
bool
oid8eq
(
Oid
arg1
[],
Oid
arg2
[]);
extern
bool
oideqint4
(
Oid
arg1
,
int32
arg2
);
extern
bool
int4eqoid
(
int32
arg1
,
Oid
arg2
);
...
...
@@ -420,19 +422,19 @@ extern char *bpcharin(char *s, int dummy, int typlen);
extern
char
*
bpcharout
(
char
*
s
);
extern
char
*
varcharin
(
char
*
s
,
int
dummy
,
int
typlen
);
extern
char
*
varcharout
(
char
*
s
);
extern
int32
bpchareq
(
char
*
arg1
,
char
*
arg2
);
extern
int32
bpcharne
(
char
*
arg1
,
char
*
arg2
);
extern
int32
bpcharlt
(
char
*
arg1
,
char
*
arg2
);
extern
int32
bpcharle
(
char
*
arg1
,
char
*
arg2
);
extern
int32
bpchargt
(
char
*
arg1
,
char
*
arg2
);
extern
int32
bpcharge
(
char
*
arg1
,
char
*
arg2
);
extern
bool
bpchareq
(
char
*
arg1
,
char
*
arg2
);
extern
bool
bpcharne
(
char
*
arg1
,
char
*
arg2
);
extern
bool
bpcharlt
(
char
*
arg1
,
char
*
arg2
);
extern
bool
bpcharle
(
char
*
arg1
,
char
*
arg2
);
extern
bool
bpchargt
(
char
*
arg1
,
char
*
arg2
);
extern
bool
bpcharge
(
char
*
arg1
,
char
*
arg2
);
extern
int32
bpcharcmp
(
char
*
arg1
,
char
*
arg2
);
extern
int32
varchareq
(
char
*
arg1
,
char
*
arg2
);
extern
int32
varcharne
(
char
*
arg1
,
char
*
arg2
);
extern
int32
varcharlt
(
char
*
arg1
,
char
*
arg2
);
extern
int32
varcharle
(
char
*
arg1
,
char
*
arg2
);
extern
int32
varchargt
(
char
*
arg1
,
char
*
arg2
);
extern
int32
varcharge
(
char
*
arg1
,
char
*
arg2
);
extern
bool
varchareq
(
char
*
arg1
,
char
*
arg2
);
extern
bool
varcharne
(
char
*
arg1
,
char
*
arg2
);
extern
bool
varcharlt
(
char
*
arg1
,
char
*
arg2
);
extern
bool
varcharle
(
char
*
arg1
,
char
*
arg2
);
extern
bool
varchargt
(
char
*
arg1
,
char
*
arg2
);
extern
bool
varcharge
(
char
*
arg1
,
char
*
arg2
);
extern
int32
varcharcmp
(
char
*
arg1
,
char
*
arg2
);
extern
uint32
hashbpchar
(
struct
varlena
*
key
);
extern
uint32
hashvarchar
(
struct
varlena
*
key
);
...
...
@@ -445,41 +447,63 @@ extern struct varlena *textin(char *inputText);
extern
char
*
textout
(
struct
varlena
*
vlena
);
extern
int
textlen
(
text
*
t
);
extern
text
*
textcat
(
text
*
t1
,
text
*
t2
);
extern
int32
texteq
(
struct
varlena
*
arg1
,
struct
varlena
*
arg2
);
extern
int32
textne
(
struct
varlena
*
arg1
,
struct
varlena
*
arg2
);
extern
int32
text_lt
(
struct
varlena
*
arg1
,
struct
varlena
*
arg2
);
extern
int32
text_le
(
struct
varlena
*
arg1
,
struct
varlena
*
arg2
);
extern
int32
text_gt
(
struct
varlena
*
arg1
,
struct
varlena
*
arg2
);
extern
int32
text_ge
(
struct
varlena
*
arg1
,
struct
varlena
*
arg2
);
extern
bool
texteq
(
struct
varlena
*
arg1
,
struct
varlena
*
arg2
);
extern
bool
textne
(
struct
varlena
*
arg1
,
struct
varlena
*
arg2
);
extern
bool
text_lt
(
struct
varlena
*
arg1
,
struct
varlena
*
arg2
);
extern
bool
text_le
(
struct
varlena
*
arg1
,
struct
varlena
*
arg2
);
extern
bool
text_gt
(
struct
varlena
*
arg1
,
struct
varlena
*
arg2
);
extern
bool
text_ge
(
struct
varlena
*
arg1
,
struct
varlena
*
arg2
);
extern
int32
byteaGetSize
(
struct
varlena
*
v
);
extern
int32
byteaGetByte
(
struct
varlena
*
v
,
int32
n
);
extern
int32
byteaGetBit
(
struct
varlena
*
v
,
int32
n
);
extern
struct
varlena
*
byteaSetByte
(
struct
varlena
*
v
,
int32
n
,
int32
newByte
);
extern
struct
varlena
*
byteaSetBit
(
struct
varlena
*
v
,
int32
n
,
int32
newBit
);
/* datetimes.c */
/* datetime.c */
#if USE_NEW_DATE
extern
DateADT
date_in
(
char
*
datestr
);
extern
char
*
date_out
(
DateADT
dateVal
);
extern
bool
date_eq
(
DateADT
dateVal1
,
DateADT
dateVal2
);
extern
bool
date_ne
(
DateADT
dateVal1
,
DateADT
dateVal2
);
extern
bool
date_lt
(
DateADT
dateVal1
,
DateADT
dateVal2
);
extern
bool
date_le
(
DateADT
dateVal1
,
DateADT
dateVal2
);
extern
bool
date_gt
(
DateADT
dateVal1
,
DateADT
dateVal2
);
extern
bool
date_ge
(
DateADT
dateVal1
,
DateADT
dateVal2
);
extern
int
date_cmp
(
DateADT
dateVal1
,
DateADT
dateVal2
);
extern
DateADT
date_larger
(
DateADT
dateVal1
,
DateADT
dateVal2
);
extern
DateADT
date_smaller
(
DateADT
dateVal1
,
DateADT
dateVal2
);
extern
int32
date_mi
(
DateADT
dateVal1
,
DateADT
dateVal2
);
extern
DateADT
date_pli
(
DateADT
dateVal
,
int32
days
);
extern
DateADT
date_mii
(
DateADT
dateVal
,
int32
days
);
#else
extern
int4
date_in
(
char
*
datestr
);
extern
char
*
date_out
(
int4
dateVal
);
extern
int
date_eq
(
int4
dateVal1
,
int4
dateVal2
);
extern
int
date_ne
(
int4
dateVal1
,
int4
dateVal2
);
extern
int
date_lt
(
int4
dateVal1
,
int4
dateVal2
);
extern
int
date_le
(
int4
dateVal1
,
int4
dateVal2
);
extern
int
date_gt
(
int4
dateVal1
,
int4
dateVal2
);
extern
int
date_ge
(
int4
dateVal1
,
int4
dateVal2
);
extern
bool
date_eq
(
int4
dateVal1
,
int4
dateVal2
);
extern
bool
date_ne
(
int4
dateVal1
,
int4
dateVal2
);
extern
bool
date_lt
(
int4
dateVal1
,
int4
dateVal2
);
extern
bool
date_le
(
int4
dateVal1
,
int4
dateVal2
);
extern
bool
date_gt
(
int4
dateVal1
,
int4
dateVal2
);
extern
bool
date_ge
(
int4
dateVal1
,
int4
dateVal2
);
extern
int
date_cmp
(
int4
dateVal1
,
int4
dateVal2
);
extern
int4
date_larger
(
int4
dateVal1
,
int4
dateVal2
);
extern
int4
date_smaller
(
int4
dateVal1
,
int4
dateVal2
);
extern
int32
date_mi
(
int4
dateVal1
,
int4
dateVal2
);
extern
int4
date_pli
(
int4
dateVal
,
int32
days
);
extern
int4
date_mii
(
int4
dateVal
,
int32
days
);
extern
char
*
time_in
(
char
*
timestr
);
#endif
extern
TimeADT
*
time_in
(
char
*
timestr
);
extern
char
*
time_out
(
TimeADT
*
time
);
extern
int
time_eq
(
TimeADT
*
time1
,
TimeADT
*
time2
);
extern
int
time_ne
(
TimeADT
*
time1
,
TimeADT
*
time2
);
extern
int
time_lt
(
TimeADT
*
time1
,
TimeADT
*
time2
);
extern
int
time_le
(
TimeADT
*
time1
,
TimeADT
*
time2
);
extern
int
time_gt
(
TimeADT
*
time1
,
TimeADT
*
time2
);
extern
int
time_ge
(
TimeADT
*
time1
,
TimeADT
*
time2
);
extern
bool
time_eq
(
TimeADT
*
time1
,
TimeADT
*
time2
);
extern
bool
time_ne
(
TimeADT
*
time1
,
TimeADT
*
time2
);
extern
bool
time_lt
(
TimeADT
*
time1
,
TimeADT
*
time2
);
extern
bool
time_le
(
TimeADT
*
time1
,
TimeADT
*
time2
);
extern
bool
time_gt
(
TimeADT
*
time1
,
TimeADT
*
time2
);
extern
bool
time_ge
(
TimeADT
*
time1
,
TimeADT
*
time2
);
extern
int
time_cmp
(
TimeADT
*
time1
,
TimeADT
*
time2
);
extern
int32
int42reltime
(
int32
timevalue
);
...
...
src/include/utils/datetime.h
View file @
791c0758
...
...
@@ -6,13 +6,21 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: datetime.h,v 1.
1 1996/11/10 03:06:21 momjian
Exp $
* $Id: datetime.h,v 1.
2 1997/03/14 23:33:21 scrappy
Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef DATETIME_H
#define DATETIME_H
#include "utils/dt.h"
#if USE_NEW_DATE
typedef
int32
DateADT
;
#else
/* these things look like structs, but we pass them by value so be careful
For example, passing an int -> DateADT is not portable! */
typedef
struct
DateADT
{
...
...
@@ -21,10 +29,20 @@ typedef struct DateADT {
short
year
;
}
DateADT
;
#endif
#if USE_NEW_TIME
typedef
float8
TimeADT
;
#else
typedef
struct
TimeADT
{
short
hr
;
short
min
;
float
sec
;
}
TimeADT
;
#endif
#endif
/* DATETIME_H */
src/include/utils/dt.h
0 → 100644
View file @
791c0758
/*-------------------------------------------------------------------------
*
* dt.h--
* Definitions for the date/time and other date/time support code.
* The support code is shared with other date data types,
* including abstime, reltime, date, and time.
*
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: dt.h,v 1.1 1997/03/14 23:33:23 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef DT_H
#define DT_H
#include <time.h>
/*
* DateTime represents absolute time.
* TimeSpan represents delta time.
* Note that Postgres uses "time interval" to mean a bounded interval,
* consisting of a beginning and ending time, not a time span.
*/
typedef
double
DateTime
;
typedef
struct
{
double
time
;
/* all time units other than months and years */
int4
month
;
/* months and years */
}
TimeSpan
;
#define USE_NEW_TIME_CODE 1
#define USE_NEW_DATE 0
#define USE_NEW_TIME 0
/* ----------------------------------------------------------------
* time types + support macros
*
* String definitions for standard time quantities.
*
* These strings are the defaults used to form output time strings.
* Other alternate forms are hardcoded into token tables in dt.c.
* ----------------------------------------------------------------
*/
#define DAGO "ago"
#define DCURRENT "current"
#define EPOCH "epoch"
#define INVALID "invalid"
#define EARLY "-infinity"
#define LATE "infinity"
#define NOW "now"
#define TODAY "today"
#define TOMORROW "tomorrow"
#define YESTERDAY "yesterday"
#define ZULU "zulu"
#define DMICROSEC "usecond"
#define DMILLISEC "msecond"
#define DSECOND "second"
#define DMINUTE "minute"
#define DHOUR "hour"
#define DDAY "day"
#define DWEEK "week"
#define DMONTH "month"
#define DYEAR "year"
#define DDECADE "decade"
#define DCENTURY "century"
#define DMILLENIUM "millenium"
#define DA_D "ad"
#define DB_C "bc"
/*
* Fundamental time field definitions for parsing.
*
* Meridian: am, pm, or 24-hour style.
* Millenium: ad, bc
*/
#define AM 0
#define PM 1
#define HR24 2
#define AD 0
#define BC 1
/*
* Fields for time decoding.
* Can't have more of these than there are bits in an unsigned int
* since these are turned into bit masks during parsing and decoding.
*/
#define RESERV 0
#define MONTH 1
#define YEAR 2
#define DAY 3
#define TIME 4
#define TZ 5
#define DTZ 6
#define IGNORE 7
#define AMPM 8
#define HOUR 9
#define MINUTE 10
#define SECOND 11
#define DOY 12
#define DOW 13
#define UNITS 14
#define ADBC 15
/* these are only for relative dates */
#define ABS_BEFORE 14
#define ABS_AFTER 15
#define AGO 16
/*
* Token field definitions for time parsing and decoding.
* These need to fit into the datetkn table type.
* At the moment, that means keep them within [-127,127].
*/
#define DTK_NUMBER 0
#define DTK_STRING 1
#define DTK_DATETIME 2
#define DTK_DATE 3
#define DTK_TIME 4
#define DTK_TZ 5
#define DTK_SPECIAL 6
#define DTK_INVALID 7
#define DTK_CURRENT 8
#define DTK_EARLY 9
#define DTK_LATE 10
#define DTK_EPOCH 11
#define DTK_NOW 12
#define DTK_YESTERDAY 13
#define DTK_TODAY 14
#define DTK_TOMORROW 15
#define DTK_ZULU 16
#define DTK_DELTA 32
#define DTK_SECOND 33
#define DTK_MINUTE 34
#define DTK_HOUR 35
#define DTK_DAY 36
#define DTK_WEEK 37
#define DTK_MONTH 38
#define DTK_YEAR 39
#define DTK_DECADE 40
#define DTK_CENTURY 41
#define DTK_MILLENIUM 42
#define DTK_MILLISEC 43
#define DTK_MICROSEC 44
#define DTK_AGO 45
/*
* Bit mask definitions for time parsing.
*/
#define DTK_M(t) (0x01 << t)
#define DTK_DATE_M (DTK_M(YEAR) | DTK_M(MONTH) | DTK_M(DAY))
#define DTK_TIME_M (DTK_M(HOUR) | DTK_M(MINUTE) | DTK_M(SECOND))
#define MAXDATELEN 47
/* maximum possible length of an input date string */
#define MAXDATEFIELDS 25
/* maximum possible number of fields in a date string */
#define TOKMAXLEN 10
/* only this many chars are stored in datetktbl */
/* keep this struct small; it gets used a lot */
typedef
struct
{
#if defined(aix)
char
*
token
;
#else
char
token
[
TOKMAXLEN
];
#endif
/* aix */
char
type
;
char
value
;
/* this may be unsigned, alas */
}
datetkn
;
extern
int
EuroDates
;
extern
void
GetCurrentTime
(
struct
tm
*
tm
);
/*
* dt.c prototypes
*/
extern
DateTime
*
datetime_in
(
char
*
str
);
extern
char
*
datetime_out
(
DateTime
*
dt
);
extern
TimeSpan
*
timespan_in
(
char
*
str
);
extern
char
*
timespan_out
(
TimeSpan
*
span
);
extern
TimeSpan
*
datetime_sub
(
DateTime
*
dt1
,
DateTime
*
dt2
);
extern
DateTime
*
datetime_add_span
(
DateTime
*
dt
,
TimeSpan
*
span
);
extern
DateTime
*
datetime_sub_span
(
DateTime
*
dt
,
TimeSpan
*
span
);
extern
TimeSpan
*
timespan_add
(
TimeSpan
*
span1
,
TimeSpan
*
span2
);
extern
TimeSpan
*
timespan_sub
(
TimeSpan
*
span1
,
TimeSpan
*
span2
);
extern
DateTime
dt2local
(
DateTime
dt
,
int
timezone
);
extern
void
j2date
(
int
jd
,
int
*
year
,
int
*
month
,
int
*
day
);
extern
int
date2j
(
int
year
,
int
month
,
int
day
);
extern
int
j2day
(
int
jd
);
extern
double
time2t
(
const
int
hour
,
const
int
min
,
const
double
sec
);
extern
void
dt2time
(
DateTime
dt
,
int
*
hour
,
int
*
min
,
double
*
sec
);
/*
extern void GetCurrentTime(struct tm *tm);
*/
extern
int
ParseDateTime
(
char
*
timestr
,
char
*
lowstr
,
char
*
field
[],
int
ftype
[],
int
maxfields
,
int
*
numfields
);
extern
int
DecodeDateTime
(
char
*
field
[],
int
ftype
[],
int
nf
,
int
*
dtype
,
struct
tm
*
tm
,
double
*
fsec
,
int
*
tzp
);
extern
int
DecodeDate
(
char
*
str
,
int
fmask
,
int
*
tmask
,
struct
tm
*
tm
);
extern
int
DecodeNumber
(
int
flen
,
char
*
field
,
int
fmask
,
int
*
tmask
,
struct
tm
*
tm
,
double
*
fsec
);
extern
int
DecodeNumberField
(
int
len
,
char
*
str
,
int
fmask
,
int
*
tmask
,
struct
tm
*
tm
,
double
*
fsec
);
extern
int
DecodeTime
(
char
*
str
,
int
fmask
,
int
*
tmask
,
struct
tm
*
tm
,
double
*
fsec
);
extern
int
DecodeTimeOnly
(
char
*
field
[],
int
ftype
[],
int
nf
,
int
*
dtype
,
struct
tm
*
tm
,
double
*
fsec
);
extern
int
DecodeTimezone
(
char
*
str
,
int
*
tzp
);
extern
int
DecodeSpecial
(
int
field
,
char
*
lowtoken
,
int
*
val
);
extern
int
DecodeDateDelta
(
char
*
field
[],
int
ftype
[],
int
nf
,
int
*
dtype
,
struct
tm
*
tm
,
double
*
fsec
);
extern
int
DecodeUnits
(
int
field
,
char
*
lowtoken
,
int
*
val
);
extern
int
EncodeSpecialDateTime
(
DateTime
*
dt
,
char
*
str
);
extern
int
EncodePostgresDate
(
struct
tm
*
tm
,
double
fsec
,
char
*
str
);
extern
int
EncodePostgresSpan
(
struct
tm
*
tm
,
double
fsec
,
char
*
str
);
extern
datetkn
*
datebsearch
(
char
*
key
,
datetkn
*
base
,
unsigned
int
nel
);
#endif
/* DT_H */
src/include/utils/geo
-
decls.h
→
src/include/utils/geo
_
decls.h
View file @
791c0758
/*-------------------------------------------------------------------------
*
* geo
-
decls.h--
* geo
_
decls.h--
* Declarations for various 2D constructs.
*
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: geo
-decls.h,v 1.4 1996/11/10 03:06:32 momjian
Exp $
* $Id: geo
_decls.h,v 1.1 1997/03/14 23:33:27 scrappy
Exp $
*
* NOTE
* These routines do *not* use the float types from adt/.
...
...
@@ -114,7 +114,7 @@ typedef struct {
/*
* in geo
-
ops.h
* in geo
_
ops.h
*/
extern
BOX
*
box_in
(
char
*
str
);
extern
char
*
box_out
(
BOX
*
box
);
...
...
@@ -235,7 +235,7 @@ extern long poly_overlap(POLYGON *polya, POLYGON *polyb);
extern
long
poly_contain
(
POLYGON
*
polya
,
POLYGON
*
polyb
);
extern
long
poly_contained
(
POLYGON
*
polya
,
POLYGON
*
polyb
);
/* geo
-
selfuncs.c */
/* geo
_
selfuncs.c */
extern
float64
areasel
(
Oid
opid
,
Oid
relid
,
AttrNumber
attno
,
char
*
value
,
int32
flag
);
extern
float64
areajoinsel
(
Oid
opid
,
Oid
relid
,
AttrNumber
attno
,
...
...
src/include/utils/nabstime.h
View file @
791c0758
...
...
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: nabstime.h,v 1.
4 1996/11/04 07:18:45
scrappy Exp $
* $Id: nabstime.h,v 1.
5 1997/03/14 23:33:29
scrappy Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -14,6 +14,8 @@
#define NABSTIME_H
#include <time.h>
#include "utils/dt.h"
/* ----------------------------------------------------------------
* time types + support macros
...
...
@@ -30,11 +32,21 @@ typedef struct {
}
TimeIntervalData
;
typedef
TimeIntervalData
*
TimeInterval
;
/*
* Reserved values
* Epoch is Unix system time zero, but needs to be kept as a reserved
* value rather than converting to time since timezone calculations
* might move it away from 1970-01-01 00:00:00Z - tgl 97/02/20
*
* Pre-v6.1 code had large decimal numbers for reserved values.
* These were chosen as special 32-bit bit patterns,
* so redefine them explicitly using these bit patterns. - tgl 97/02/24
*/
#define EPOCH_ABSTIME ((AbsoluteTime) 0)
#define INVALID_ABSTIME ((AbsoluteTime)
2147483647)
/*
2^31 - 1 */
#define CURRENT_ABSTIME ((AbsoluteTime)
2147483646)
/*
2^31 - 2 */
#define NOEND_ABSTIME ((AbsoluteTime)
2147483645)
/*
2^31 - 3 */
#define INVALID_ABSTIME ((AbsoluteTime)
0x4FFFFFFE)
/* 2147483647 ==
2^31 - 1 */
#define CURRENT_ABSTIME ((AbsoluteTime)
0x4FFFFFFD)
/* 2147483646 ==
2^31 - 2 */
#define NOEND_ABSTIME ((AbsoluteTime)
0x4FFFFFFC)
/* 2147483645 ==
2^31 - 3 */
#define BIG_ABSTIME ((AbsoluteTime) 0x4FFFFFFB)
/* 2147483644 == 2^31 - 4 */
#if defined(aix)
/*
...
...
@@ -47,15 +59,10 @@ typedef TimeIntervalData *TimeInterval;
#define NOSTART_ABSTIME ((AbsoluteTime) INT_MIN)
#else
/*#define NOSTART_ABSTIME ((AbsoluteTime) 2147483648)*/
/* - 2^31 */
#define NOSTART_ABSTIME ((AbsoluteTime)
-2147483647)
/*
- 2^31 */
#define NOSTART_ABSTIME ((AbsoluteTime)
0x80000001)
/* -2147483647 ==
- 2^31 */
#endif
/* aix */
#define INVALID_RELTIME ((RelativeTime) 2147483647)
/* 2^31 - 1 */
/* ----------------
* time support macros (from tim.h)
* ----------------
*/
#define INVALID_RELTIME ((RelativeTime) 0x4FFFFFFE)
/* 2147483647 == 2^31 - 1 */
#define AbsoluteTimeIsValid(time) \
((bool) ((time) != INVALID_ABSTIME))
...
...
@@ -77,9 +84,17 @@ typedef TimeIntervalData *TimeInterval;
#define RelativeTimeIsValid(time) \
((bool) (((RelativeTime) time) != INVALID_RELTIME))
#if USE_NEW_TIME_CODE
extern
AbsoluteTime
GetCurrentAbsoluteTime
(
void
);
#else
#define GetCurrentAbsoluteTime() \
((AbsoluteTime) getSystemTime())
#endif
/*
* getSystemTime --
* Returns system time.
...
...
@@ -87,73 +102,29 @@ typedef TimeIntervalData *TimeInterval;
#define getSystemTime() \
((time_t) (time(0l)))
/*
* Meridian: am, pm, or 24-hour style.
*/
#define AM 0
#define PM 1
#define HR24 2
/* can't have more of these than there are bits in an unsigned long */
#define MONTH 1
#define YEAR 2
#define DAY 3
#define TIME 4
#define TZ 5
#define DTZ 6
#define PG_IGNORE 7
#define AMPM 8
/* below here are unused so far */
#define SECONDS 9
#define MONTHS 10
#define YEARS 11
#define NUMBER 12
/* these are only for relative dates */
#define ABS_BEFORE 13
#define ABS_AFTER 14
#define AGO 15
#define SECS(n) ((time_t)(n))
#define MINS(n) ((time_t)(n) * SECS(60))
#define HOURS(n) ((time_t)(n) * MINS(60))
/* 3600 secs */
#define DAYS(n) ((time_t)(n) * HOURS(24))
/* 86400 secs */
/* months and years are not constant length, must be specially dealt with */
#define TOKMAXLEN 6
/* only this many chars are stored in datetktbl */
/* keep this struct small; it gets used a lot */
typedef
struct
{
#if defined(aix)
char
*
token
;
#else
char
token
[
TOKMAXLEN
];
#endif
/* aix */
char
type
;
char
value
;
/* this may be unsigned, alas */
}
datetkn
;
/*
* nabstime.c prototypes
*/
extern
AbsoluteTime
nabstimein
(
char
*
timestr
);
extern
int
prsabsdate
(
char
*
timestr
,
struct
tm
*
tm
,
int
*
tzp
);
extern
int
tryabsdate
(
char
*
fields
[],
int
nf
,
struct
tm
*
tm
,
int
*
tzp
);
extern
int
parsetime
(
char
*
time
,
struct
tm
*
tm
);
extern
int
split
(
char
*
string
,
char
*
fields
[],
int
nfields
,
char
*
sep
);
extern
char
*
nabstimeout
(
AbsoluteTime
time
);
extern
AbsoluteTime
dateconv
(
struct
tm
*
tm
,
int
zone
);
extern
time_t
qmktime
(
struct
tm
*
tp
);
extern
datetkn
*
datetoktype
(
char
*
s
,
int
*
bigvalp
);
extern
datetkn
*
datebsearch
(
char
*
key
,
datetkn
*
base
,
unsigned
int
nel
);
extern
bool
AbsoluteTimeIsBefore
(
AbsoluteTime
time1
,
AbsoluteTime
time2
);
extern
bool
AbsoluteTimeIsAfter
(
AbsoluteTime
time1
,
AbsoluteTime
time2
);
extern
int32
abstimeeq
(
AbsoluteTime
t1
,
AbsoluteTime
t2
);
extern
int32
abstimene
(
AbsoluteTime
t1
,
AbsoluteTime
t2
);
extern
int32
abstimelt
(
AbsoluteTime
t1
,
AbsoluteTime
t2
);
extern
int32
abstimegt
(
AbsoluteTime
t1
,
AbsoluteTime
t2
);
extern
int32
abstimele
(
AbsoluteTime
t1
,
AbsoluteTime
t2
);
extern
int32
abstimege
(
AbsoluteTime
t1
,
AbsoluteTime
t2
);
extern
bool
abstimeeq
(
AbsoluteTime
t1
,
AbsoluteTime
t2
);
extern
bool
abstimene
(
AbsoluteTime
t1
,
AbsoluteTime
t2
);
extern
bool
abstimelt
(
AbsoluteTime
t1
,
AbsoluteTime
t2
);
extern
bool
abstimegt
(
AbsoluteTime
t1
,
AbsoluteTime
t2
);
extern
bool
abstimele
(
AbsoluteTime
t1
,
AbsoluteTime
t2
);
extern
bool
abstimege
(
AbsoluteTime
t1
,
AbsoluteTime
t2
);
extern
AbsoluteTime
dateconv
(
struct
tm
*
tm
,
int
zone
);
extern
time_t
qmktime
(
struct
tm
*
tp
);
#endif
/* NABSTIME_H */
src/interfaces/libpq/Makefile
View file @
791c0758
...
...
@@ -7,7 +7,7 @@
#
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/interfaces/libpq/Makefile,v 1.2
7 1997/01/20 00:51:38 bryanh
Exp $
# $Header: /cvsroot/pgsql/src/interfaces/libpq/Makefile,v 1.2
8 1997/03/14 23:34:03 scrappy
Exp $
#
#-------------------------------------------------------------------------
...
...
@@ -81,7 +81,7 @@ install-headers: beforeinstall-headers c.h \
../include/postgres.h ../include/postgres_ext.h
\
../include/config.h ../include/libpq/pqcomm.h
\
../include/libpq/libpq-fs.h ../include/lib/dllist.h
\
../include/utils/geo
-
decls.h libpq-fe.h
../include/utils/geo
_
decls.h libpq-fe.h
$(INSTALL)
$(INSTLOPTS)
../include/config.h
\
$(HEADERDIR)
/config.h
$(INSTALL)
$(INSTLOPTS)
../include/postgres.h
\
...
...
@@ -94,8 +94,8 @@ install-headers: beforeinstall-headers c.h \
$(HEADERDIR)
/libpq/libpq-fs.h
$(INSTALL)
$(INSTLOPTS)
../include/lib/dllist.h
\
$(HEADERDIR)
/lib/dllist.h
$(INSTALL)
$(INSTLOPTS)
../include/utils/geo
-
decls.h
\
$(HEADERDIR)
/utils/geo
-
decls.h
$(INSTALL)
$(INSTLOPTS)
../include/utils/geo
_
decls.h
\
$(HEADERDIR)
/utils/geo
_
decls.h
$(INSTALL)
$(INSTLOPTS)
../include/utils/elog.h
\
$(HEADERDIR)
/utils/elog.h
$(INSTALL)
$(INSTLOPTS)
../include/utils/palloc.h
\
...
...
src/test/regress/regress.c
View file @
791c0758
/*
* $Header: /cvsroot/pgsql/src/test/regress/regress.c,v 1.
4 1996/12/09 01:24:53 bryanh
Exp $
* $Header: /cvsroot/pgsql/src/test/regress/regress.c,v 1.
5 1997/03/14 23:34:16 scrappy
Exp $
*/
#include <float.h>
/* faked on sunos */
...
...
@@ -8,7 +8,7 @@
#include <postgres.h>
#include "utils/geo
-
decls.h"
/* includes <math.h> */
#include "utils/geo
_
decls.h"
/* includes <math.h> */
#include "executor/executor.h"
/* For GetAttributeByName */
#define P_MAXDIG 12
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment