diff options
Diffstat (limited to 'src/include/commands/sequence.h')
-rw-r--r-- | src/include/commands/sequence.h | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/src/include/commands/sequence.h b/src/include/commands/sequence.h index 75b2311481d..77a5470f439 100644 --- a/src/include/commands/sequence.h +++ b/src/include/commands/sequence.h @@ -3,6 +3,10 @@ * sequence.h * prototypes for sequence.c. * + * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group + * Portions Copyright (c) 1994, Regents of the University of California + * + * $Id: sequence.h,v 1.16 2001/08/16 20:38:55 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -12,17 +16,38 @@ #include "nodes/parsenodes.h" #include "access/xlog.h" +/* + * On a machine with no 64-bit-int C datatype, sizeof(int64) will not be 8, + * but we need this struct type to line up with the way that a sequence + * table is defined --- and pg_type will say that int8 is 8 bytes anyway. + * So, we need padding. Ugly but necessary. + */ typedef struct FormData_pg_sequence { NameData sequence_name; +#ifndef INT64_IS_BUSTED + int64 last_value; + int64 increment_by; + int64 max_value; + int64 min_value; + int64 cache_value; + int64 log_cnt; +#else int32 last_value; + int32 pad1; int32 increment_by; + int32 pad2; int32 max_value; + int32 pad3; int32 min_value; + int32 pad4; int32 cache_value; + int32 pad5; int32 log_cnt; - char is_cycled; - char is_called; + int32 pad6; +#endif + bool is_cycled; + bool is_called; } FormData_pg_sequence; typedef FormData_pg_sequence *Form_pg_sequence; |