diff options
author | Vadim B. Mikheev | 1997-11-02 15:27:14 +0000 |
---|---|---|
committer | Vadim B. Mikheev | 1997-11-02 15:27:14 +0000 |
commit | 32cd09ac6d467ec788f8f4181097d47bafcfaee1 (patch) | |
tree | 96d5420e42ed087eb9df2d951ba1af38769eded7 /src/include | |
parent | 6cc0a00deca18681f48a8afd1215659771a2b049 (diff) |
Good Bye, Time Travel!
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/access/heapam.h | 4 | ||||
-rw-r--r-- | src/include/access/htup.h | 51 | ||||
-rw-r--r-- | src/include/access/transam.h | 57 | ||||
-rw-r--r-- | src/include/access/valid.h | 11 | ||||
-rw-r--r-- | src/include/access/xact.h | 13 | ||||
-rw-r--r-- | src/include/catalog/catname.h | 3 | ||||
-rw-r--r-- | src/include/catalog/pg_attribute.h | 139 | ||||
-rw-r--r-- | src/include/catalog/pg_class.h | 4 | ||||
-rw-r--r-- | src/include/catalog/pg_time.h | 41 | ||||
-rw-r--r-- | src/include/catalog/pg_type.h | 5 | ||||
-rw-r--r-- | src/include/parser/parse_query.h | 5 | ||||
-rw-r--r-- | src/include/postgres.h | 4 | ||||
-rw-r--r-- | src/include/utils/tqual.h | 17 |
13 files changed, 85 insertions, 269 deletions
diff --git a/src/include/access/heapam.h b/src/include/access/heapam.h index 4621d836713..a66fcab073a 100644 --- a/src/include/access/heapam.h +++ b/src/include/access/heapam.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: heapam.h,v 1.20 1997/10/30 23:37:01 momjian Exp $ + * $Id: heapam.h,v 1.21 1997/11/02 15:26:37 vadim Exp $ * *------------------------------------------------------------------------- */ @@ -142,7 +142,7 @@ extern void heap_restrpos(HeapScanDesc sdesc); extern Size ComputeDataSize(TupleDesc tupleDesc, Datum value[], char nulls[]); extern void DataFill(char *data, TupleDesc tupleDesc, - Datum value[], char nulls[], char *infomask, + Datum value[], char nulls[], uint16 *infomask, bits8 *bit); extern int heap_attisnull(HeapTuple tup, int attnum); extern int heap_sysattrlen(AttrNumber attno); diff --git a/src/include/access/htup.h b/src/include/access/htup.h index 0b6653f3865..72fb5a8d314 100644 --- a/src/include/access/htup.h +++ b/src/include/access/htup.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: htup.h,v 1.6 1997/09/08 21:50:46 momjian Exp $ + * $Id: htup.h,v 1.7 1997/11/02 15:26:42 vadim Exp $ * *------------------------------------------------------------------------- */ @@ -28,33 +28,25 @@ */ typedef struct HeapTupleData { + unsigned int t_len; /* length of entire tuple */ - unsigned int t_len; /* length of entire tuple */ + Oid t_oid; /* OID of this tuple -- 4 bytes */ - ItemPointerData t_ctid; /* current TID of this tuple */ + CommandId t_cmin; /* insert CID stamp -- 4 bytes each */ + CommandId t_cmax; /* delete CommandId stamp */ - ItemPointerData t_chain; /* replaced tuple TID */ + TransactionId t_xmin; /* insert XID stamp -- 4 bytes each */ + TransactionId t_xmax; /* delete XID stamp */ - Oid t_oid; /* OID of this tuple -- 4 bytes */ + ItemPointerData t_ctid; /* current TID of this tuple */ + + int16 t_natts; /* number of attributes */ - CommandId t_cmin; /* insert CID stamp -- 2 bytes each */ - CommandId t_cmax; /* delete CommandId stamp */ + uint16 t_infomask; /* various infos */ - TransactionId t_xmin; /* insert XID stamp -- 4 bytes each */ - TransactionId t_xmax; /* delete XID stamp */ + uint8 t_hoff; /* sizeof tuple header */ - AbsoluteTime t_tmin; /* time stamps -- 4 bytes each */ - AbsoluteTime t_tmax; - - int16 t_natts; /* number of attributes */ - char t_vtype; /* not used - padding */ - - char t_infomask; /* whether tuple as null or variable - * length attributes */ - - uint8 t_hoff; /* sizeof tuple header */ - - bits8 t_bits[MinHeapTupleBitmapSize / 8]; + bits8 t_bits[MinHeapTupleBitmapSize / 8]; /* bit map of domains */ /* MORE DATA FOLLOWS AT END OF STRUCT */ @@ -69,12 +61,7 @@ typedef HeapTupleData *HeapTuple; #define MinCommandIdAttributeNumber (-4) #define MaxTransactionIdAttributeNumber (-5) #define MaxCommandIdAttributeNumber (-6) -#define ChainItemPointerAttributeNumber (-7) -#define AnchorItemPointerAttributeNumber (-8) -#define MinAbsoluteTimeAttributeNumber (-9) -#define MaxAbsoluteTimeAttributeNumber (-10) -#define VersionTypeAttributeNumber (-11) -#define FirstLowInvalidHeapAttributeNumber (-12) +#define FirstLowInvalidHeapAttributeNumber (-7) /* ---------------- @@ -101,9 +88,15 @@ typedef HeapTupleData *HeapTuple; /* * information stored in t_infomask: */ -#define HEAP_HASNULL 0x01 /* has null attribute(s) */ -#define HEAP_HASVARLENA 0x02 /* has variable length +#define HEAP_HASNULL 0x0001 /* has null attribute(s) */ +#define HEAP_HASVARLENA 0x0002 /* has variable length * attribute(s) */ +#define HEAP_XMIN_COMMITTED 0x0100 /* t_xmin committed */ +#define HEAP_XMIN_INVALID 0x0200 /* t_xmin invalid/aborted */ +#define HEAP_XMAX_COMMITTED 0x0400 /* t_xmax committed */ +#define HEAP_XMAX_INVALID 0x0800 /* t_xmax invalid/aborted */ + +#define HEAP_XACT_MASK 0x0F00 /* */ #define HeapTupleNoNulls(tuple) \ (!(((HeapTuple) (tuple))->t_infomask & HEAP_HASNULL)) diff --git a/src/include/access/transam.h b/src/include/access/transam.h index efb6e824a7a..fb4a6cd7242 100644 --- a/src/include/access/transam.h +++ b/src/include/access/transam.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: transam.h,v 1.11 1997/09/08 21:51:03 momjian Exp $ + * $Id: transam.h,v 1.12 1997/11/02 15:26:44 vadim Exp $ * * NOTES * Transaction System Version 101 now support proper oid @@ -18,7 +18,6 @@ #define TRANSAM_H #include <storage/bufmgr.h> -#include <utils/nabstime.h> /* ---------------- * transaction system version id @@ -33,19 +32,19 @@ * even if their minor versions differ. * ---------------- */ -#define TRANS_SYSTEM_VERSION 101 +#define TRANS_SYSTEM_VERSION 200 /* ---------------- * transaction id status values * - * someday we will use "11" = 3 = XID_INVALID to mean the - * starting of run-length encoded log data. + * someday we will use "11" = 3 = XID_COMMIT_CHILD to mean the + * commiting of child xactions. * ---------------- */ -#define XID_COMMIT 2 /* transaction commited */ -#define XID_ABORT 1 /* transaction aborted */ -#define XID_INPROGRESS 0 /* transaction in progress */ -#define XID_INVALID 3 /* other */ +#define XID_COMMIT 2 /* transaction commited */ +#define XID_ABORT 1 /* transaction aborted */ +#define XID_INPROGRESS 0 /* transaction in progress */ +#define XID_COMMIT_CHILD 3 /* child xact commited */ typedef unsigned char XidStatus;/* (2 bits) */ @@ -69,7 +68,6 @@ typedef unsigned char XidStatus;/* (2 bits) */ */ #define TP_DataSize BLCKSZ #define TP_NumXidStatusPerBlock (TP_DataSize * 4) -#define TP_NumTimePerBlock (TP_DataSize / 4) /* ---------------- * LogRelationContents structure @@ -91,25 +89,6 @@ typedef struct LogRelationContentsData typedef LogRelationContentsData *LogRelationContents; /* ---------------- - * TimeRelationContents structure - * - * This structure describes the storage of the data in the - * first 2048 bytes of the time relation. This storage is never - * used for transaction commit times because transaction id's begin - * their numbering at 512. - * - * The first 4 bytes of this relation store the version - * number of the transction system. - * ---------------- - */ -typedef struct TimeRelationContentsData -{ - int TransSystemVersion; -} TimeRelationContentsData; - -typedef TimeRelationContentsData *TimeRelationContents; - -/* ---------------- * VariableRelationContents structure * * The variable relation is a special "relation" which @@ -127,10 +106,10 @@ typedef TimeRelationContentsData *TimeRelationContents; */ typedef struct VariableRelationContentsData { - int TransSystemVersion; - TransactionId nextXidData; - TransactionId lastXidData; - Oid nextOid; + int TransSystemVersion; + TransactionId nextXidData; + TransactionId lastXidData; /* unused */ + Oid nextOid; } VariableRelationContentsData; typedef VariableRelationContentsData *VariableRelationContents; @@ -143,7 +122,6 @@ typedef VariableRelationContentsData *VariableRelationContents; /* * prototypes for functions in transam/transam.c */ -extern AbsoluteTime TransactionIdGetCommitTime(TransactionId transactionId); extern void InitializeTransactionLog(void); extern bool TransactionIdDidCommit(TransactionId transactionId); extern bool TransactionIdDidAbort(TransactionId transactionId); @@ -162,18 +140,10 @@ extern void TransBlockNumberSetXidStatus(Relation relation, BlockNumber blockNumber, TransactionId xid, XidStatus xstatus, bool *failP); -extern AbsoluteTime -TransBlockNumberGetCommitTime(Relation relation, - BlockNumber blockNumber, TransactionId xid, bool *failP); -extern void -TransBlockNumberSetCommitTime(Relation relation, - BlockNumber blockNumber, TransactionId xid, AbsoluteTime xtime, - bool *failP); /* in transam/varsup.c */ extern void VariableRelationPutNextXid(TransactionId xid); extern void GetNewTransactionId(TransactionId *xid); -extern void UpdateLastCommittedXid(TransactionId xid); extern void GetNewObjectId(Oid *oid_return); extern void CheckMaxObjectId(Oid assigned_oid); @@ -184,11 +154,8 @@ extern void CheckMaxObjectId(Oid assigned_oid); /* in transam.c */ extern Relation LogRelation; -extern Relation TimeRelation; extern Relation VariableRelation; -extern TransactionId cachedGetCommitTimeXid; -extern AbsoluteTime cachedGetCommitTime; extern TransactionId cachedTestXid; extern XidStatus cachedTestXidStatus; diff --git a/src/include/access/valid.h b/src/include/access/valid.h index a37258c62a6..d7707fa495b 100644 --- a/src/include/access/valid.h +++ b/src/include/access/valid.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: valid.h,v 1.8 1997/09/18 14:20:45 momjian Exp $ + * $Id: valid.h,v 1.9 1997/11/02 15:26:46 vadim Exp $ * *------------------------------------------------------------------------- */ @@ -122,8 +122,6 @@ do \ /* We use underscores to protect the variable passed in as parameters */ \ HeapTuple _tuple; \ bool _res; \ - TransactionId _old_tmin, \ - _old_tmax; \ \ if (!ItemIdIsUsed(itemId)) \ (result) = (HeapTuple) NULL; \ @@ -144,11 +142,10 @@ do \ (result) = _tuple; \ else \ { \ - _old_tmin = _tuple->t_tmin; \ - _old_tmax = _tuple->t_tmax; \ + uint16 _infomask = _tuple->t_infomask; \ + \ _res = HeapTupleSatisfiesTimeQual(_tuple, (qual)); \ - if (_tuple->t_tmin != _old_tmin || \ - _tuple->t_tmax != _old_tmax) \ + if (_tuple->t_infomask != _infomask) \ SetBufferCommitInfoNeedsSave(buffer); \ if (_res) \ (result) = _tuple; \ diff --git a/src/include/access/xact.h b/src/include/access/xact.h index 67f59425361..80d220bc805 100644 --- a/src/include/access/xact.h +++ b/src/include/access/xact.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: xact.h,v 1.9 1997/09/08 21:51:06 momjian Exp $ + * $Id: xact.h,v 1.10 1997/11/02 15:26:48 vadim Exp $ * *------------------------------------------------------------------------- */ @@ -53,6 +53,12 @@ typedef struct TransactionStateData typedef TransactionStateData *TransactionState; +#define TransactionIdIsValid(xid) ((bool) (xid != NullTransactionId)) +#define TransactionIdStore(xid, dest) \ + (*((TransactionId*)dest) = (TransactionId)xid) +#define StoreInvalidTransactionId(dest) \ + (*((TransactionId*)dest) = NullTransactionId) + /* ---------------- * extern definitions * ---------------- @@ -88,11 +94,6 @@ extern TransactionId DisabledTransactionId; extern TransactionId xidin(char *representation); extern char *xidout(TransactionId transactionId); extern bool xideq(TransactionId xid1, TransactionId xid2); -extern bool TransactionIdIsValid(TransactionId transactionId); -extern void StoreInvalidTransactionId(TransactionId *destination); -extern void -TransactionIdStore(TransactionId transactionId, - TransactionId *destination); extern bool TransactionIdEquals(TransactionId id1, TransactionId id2); extern bool TransactionIdIsLessThan(TransactionId id1, TransactionId id2); extern void TransactionIdAdd(TransactionId *xid, int value); diff --git a/src/include/catalog/catname.h b/src/include/catalog/catname.h index 2130a472d07..d48dc07021d 100644 --- a/src/include/catalog/catname.h +++ b/src/include/catalog/catname.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: catname.h,v 1.6 1997/09/08 02:34:47 momjian Exp $ + * $Id: catname.h,v 1.7 1997/11/02 15:26:50 vadim Exp $ * *------------------------------------------------------------------------- */ @@ -40,7 +40,6 @@ #define RewriteRelationName "pg_rewrite" #define ServerRelationName "pg_server" #define StatisticRelationName "pg_statistic" -#define TimeRelationName "pg_time" #define TypeRelationName "pg_type" #define UserRelationName "pg_user" #define VariableRelationName "pg_variable" diff --git a/src/include/catalog/pg_attribute.h b/src/include/catalog/pg_attribute.h index 1729aeb2cdb..2e3897c372d 100644 --- a/src/include/catalog/pg_attribute.h +++ b/src/include/catalog/pg_attribute.h @@ -7,7 +7,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: pg_attribute.h,v 1.16 1997/09/08 02:35:02 momjian Exp $ + * $Id: pg_attribute.h,v 1.17 1997/11/02 15:26:56 vadim Exp $ * * NOTES * the genbki.sh script reads this file and generates .bki @@ -208,14 +208,9 @@ DATA(insert OID = 0 ( 1247 typdefault 25 0 -1 16 0 -1 f f i f f)); DATA(insert OID = 0 ( 1247 ctid 27 0 6 -1 0 -1 f f i f f)); DATA(insert OID = 0 ( 1247 oid 26 0 4 -2 0 -1 t f i f f)); DATA(insert OID = 0 ( 1247 xmin 28 0 4 -3 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1247 cmin 29 0 2 -4 0 -1 t f s f f)); +DATA(insert OID = 0 ( 1247 cmin 29 0 4 -4 0 -1 t f i f f)); DATA(insert OID = 0 ( 1247 xmax 28 0 4 -5 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1247 cmax 29 0 2 -6 0 -1 t f s f f)); -DATA(insert OID = 0 ( 1247 chain 27 0 6 -7 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1247 anchor 27 0 6 -8 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1247 tmin 702 0 4 -9 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1247 tmax 702 0 4 -10 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1247 vtype 18 0 1 -11 0 -1 t f c f f)); +DATA(insert OID = 0 ( 1247 cmax 29 0 4 -6 0 -1 t f i f f)); /* ---------------- * pg_database @@ -227,14 +222,9 @@ DATA(insert OID = 0 ( 1262 datpath 25 0 -1 3 0 -1 f f i f f)); DATA(insert OID = 0 ( 1262 ctid 27 0 6 -1 0 -1 f f i f f)); DATA(insert OID = 0 ( 1262 oid 26 0 4 -2 0 -1 t f i f f)); DATA(insert OID = 0 ( 1262 xmin 28 0 4 -3 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1262 cmin 29 0 2 -4 0 -1 t f s f f)); +DATA(insert OID = 0 ( 1262 cmin 29 0 4 -4 0 -1 t f i f f)); DATA(insert OID = 0 ( 1262 xmax 28 0 4 -5 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1262 cmax 29 0 2 -6 0 -1 t f s f f)); -DATA(insert OID = 0 ( 1262 chain 27 0 6 -7 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1262 anchor 27 0 6 -8 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1262 tmin 702 0 4 -9 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1262 tmax 702 0 4 -10 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1262 vtype 18 0 1 -11 0 -1 t f c f f)); +DATA(insert OID = 0 ( 1262 cmax 29 0 4 -6 0 -1 t f i f f)); /* ---------------- * pg_demon @@ -248,14 +238,9 @@ DATA(insert OID = 0 ( 1251 ctid 27 0 6 -1 0 -1 f f i f f)); DATA(insert OID = 0 ( 1251 oid 26 0 4 -2 0 -1 t f i f f)); DATA(insert OID = 0 ( 1251 xmin 28 0 4 -3 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1251 cmin 29 0 2 -4 0 -1 t f s f f)); +DATA(insert OID = 0 ( 1251 cmin 29 0 4 -4 0 -1 t f i f f)); DATA(insert OID = 0 ( 1251 xmax 28 0 4 -5 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1251 cmax 29 0 2 -6 0 -1 t f s f f)); -DATA(insert OID = 0 ( 1251 chain 27 0 6 -7 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1251 anchor 27 0 6 -8 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1251 tmin 702 0 4 -9 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1251 tmax 702 0 4 -10 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1251 vtype 18 0 1 -11 0 -1 t f c f f)); +DATA(insert OID = 0 ( 1251 cmax 29 0 4 -6 0 -1 t f i f f)); /* ---------------- * pg_proc @@ -298,14 +283,9 @@ DATA(insert OID = 0 ( 1255 probin 17 0 -1 16 0 -1 f f i f f)); DATA(insert OID = 0 ( 1255 ctid 27 0 6 -1 0 -1 f f i f f)); DATA(insert OID = 0 ( 1255 oid 26 0 4 -2 0 -1 t f i f f)); DATA(insert OID = 0 ( 1255 xmin 28 0 4 -3 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1255 cmin 29 0 2 -4 0 -1 t f s f f)); +DATA(insert OID = 0 ( 1255 cmin 29 0 4 -4 0 -1 t f i f f)); DATA(insert OID = 0 ( 1255 xmax 28 0 4 -5 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1255 cmax 29 0 2 -6 0 -1 t f s f f)); -DATA(insert OID = 0 ( 1255 chain 27 0 6 -7 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1255 anchor 27 0 6 -8 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1255 tmin 702 0 4 -9 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1255 tmax 702 0 4 -10 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1255 vtype 18 0 1 -11 0 -1 t f c f f)); +DATA(insert OID = 0 ( 1255 cmax 29 0 4 -6 0 -1 t f i f f)); /* ---------------- * pg_server @@ -317,14 +297,9 @@ DATA(insert OID = 0 ( 1257 serport 21 0 2 3 0 -1 t f s f f)); DATA(insert OID = 0 ( 1257 ctid 27 0 6 -1 0 -1 f f i f f)); DATA(insert OID = 0 ( 1257 oid 26 0 4 -2 0 -1 t f i f f)); DATA(insert OID = 0 ( 1257 xmin 28 0 4 -3 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1257 cmin 29 0 2 -4 0 -1 t f s f f)); +DATA(insert OID = 0 ( 1257 cmin 29 0 4 -4 0 -1 t f i f f)); DATA(insert OID = 0 ( 1257 xmax 28 0 4 -5 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1257 cmax 29 0 2 -6 0 -1 t f s f f)); -DATA(insert OID = 0 ( 1257 chain 27 0 6 -7 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1257 anchor 27 0 6 -8 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1257 tmin 702 0 4 -9 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1257 tmax 702 0 4 -10 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1257 vtype 18 0 1 -11 0 -1 t f c f f)); +DATA(insert OID = 0 ( 1257 cmax 29 0 4 -6 0 -1 t f i f f)); /* ---------------- * pg_user @@ -339,14 +314,9 @@ DATA(insert OID = 0 ( 1260 usecatupd 16 0 1 6 0 -1 t f c f f)); DATA(insert OID = 0 ( 1260 ctid 27 0 6 -1 0 -1 f f i f f)); DATA(insert OID = 0 ( 1260 oid 26 0 4 -2 0 -1 t f i f f)); DATA(insert OID = 0 ( 1260 xmin 28 0 4 -3 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1260 cmin 29 0 2 -4 0 -1 t f s f f)); +DATA(insert OID = 0 ( 1260 cmin 29 0 4 -4 0 -1 t f i f f)); DATA(insert OID = 0 ( 1260 xmax 28 0 4 -5 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1260 cmax 29 0 2 -6 0 -1 t f s f f)); -DATA(insert OID = 0 ( 1260 chain 27 0 6 -7 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1260 anchor 27 0 6 -8 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1260 tmin 702 0 4 -9 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1260 tmax 702 0 4 -10 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1260 vtype 18 0 1 -11 0 -1 t f c f f)); +DATA(insert OID = 0 ( 1260 cmax 29 0 4 -6 0 -1 t f i f f)); /* ---------------- * pg_group @@ -358,14 +328,9 @@ DATA(insert OID = 0 ( 1261 grolist 1007 0 -1 3 0 -1 f f i f f)); DATA(insert OID = 0 ( 1261 ctid 27 0 6 -1 0 -1 f f i f f)); DATA(insert OID = 0 ( 1261 oid 26 0 4 -2 0 -1 t f i f f)); DATA(insert OID = 0 ( 1261 xmin 28 0 4 -3 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1261 cmin 29 0 2 -4 0 -1 t f s f f)); +DATA(insert OID = 0 ( 1261 cmin 29 0 4 -4 0 -1 t f i f f)); DATA(insert OID = 0 ( 1261 xmax 28 0 4 -5 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1261 cmax 29 0 2 -6 0 -1 t f s f f)); -DATA(insert OID = 0 ( 1261 chain 27 0 6 -7 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1261 anchor 27 0 6 -8 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1261 tmin 702 0 4 -9 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1261 tmax 702 0 4 -10 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1261 vtype 18 0 1 -11 0 -1 t f c f f)); +DATA(insert OID = 0 ( 1261 cmax 29 0 4 -6 0 -1 t f i f f)); /* ---------------- * pg_attribute @@ -402,14 +367,9 @@ DATA(insert OID = 0 ( 1249 atthasdef 16 0 1 13 0 -1 t f c f f)); DATA(insert OID = 0 ( 1249 ctid 27 0 6 -1 0 -1 f f i f f)); DATA(insert OID = 0 ( 1249 oid 26 0 4 -2 0 -1 t f i f f)); DATA(insert OID = 0 ( 1249 xmin 28 0 4 -3 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1249 cmin 29 0 2 -4 0 -1 t f s f f)); +DATA(insert OID = 0 ( 1249 cmin 29 0 4 -4 0 -1 t f i f f)); DATA(insert OID = 0 ( 1249 xmax 28 0 4 -5 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1249 cmax 29 0 2 -6 0 -1 t f s f f)); -DATA(insert OID = 0 ( 1249 chain 27 0 6 -7 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1249 anchor 27 0 6 -8 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1249 tmin 702 0 4 -9 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1249 tmax 702 0 4 -10 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1249 vtype 18 0 1 -11 0 -1 t f c f f)); +DATA(insert OID = 0 ( 1249 cmax 29 0 4 -6 0 -1 t f i f f)); /* ---------------- * pg_class @@ -456,14 +416,9 @@ DATA(insert OID = 0 ( 1259 relacl 1034 0 -1 17 0 -1 f f i f f)); DATA(insert OID = 0 ( 1259 ctid 27 0 6 -1 0 -1 f f i f f)); DATA(insert OID = 0 ( 1259 oid 26 0 4 -2 0 -1 t f i f f)); DATA(insert OID = 0 ( 1259 xmin 28 0 4 -3 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1259 cmin 29 0 2 -4 0 -1 t f s f f)); +DATA(insert OID = 0 ( 1259 cmin 29 0 4 -4 0 -1 t f i f f)); DATA(insert OID = 0 ( 1259 xmax 28 0 4 -5 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1259 cmax 29 0 2 -6 0 -1 t f s f f)); -DATA(insert OID = 0 ( 1259 chain 27 0 6 -7 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1259 anchor 27 0 6 -8 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1259 tmin 702 0 4 -9 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1259 tmax 702 0 4 -10 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1259 vtype 18 0 1 -11 0 -1 t f c f f)); +DATA(insert OID = 0 ( 1259 cmax 29 0 4 -6 0 -1 t f i f f)); /* ---------------- * pg_magic @@ -474,14 +429,9 @@ DATA(insert OID = 0 ( 1253 magvalue 19 0 NAMEDATALEN 2 0 -1 f f i f f)); DATA(insert OID = 0 ( 1253 ctid 27 0 6 -1 0 -1 f f i f f)); DATA(insert OID = 0 ( 1253 oid 26 0 4 -2 0 -1 t f i f f)); DATA(insert OID = 0 ( 1253 xmin 28 0 4 -3 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1253 cmin 29 0 2 -4 0 -1 t f s f f)); +DATA(insert OID = 0 ( 1253 cmin 29 0 4 -4 0 -1 t f i f f)); DATA(insert OID = 0 ( 1253 xmax 28 0 4 -5 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1253 cmax 29 0 2 -6 0 -1 t f s f f)); -DATA(insert OID = 0 ( 1253 chain 27 0 6 -7 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1253 anchor 27 0 6 -8 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1253 tmin 702 0 4 -9 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1253 tmax 702 0 4 -10 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1253 vtype 18 0 1 -11 0 -1 t f c f f)); +DATA(insert OID = 0 ( 1253 cmax 29 0 4 -6 0 -1 t f i f f)); /* ---------------- * pg_defaults @@ -492,14 +442,9 @@ DATA(insert OID = 0 ( 1263 defvalue 19 0 NAMEDATALEN 2 0 -1 f f i f f)); DATA(insert OID = 0 ( 1263 ctid 27 0 6 -1 0 -1 f f i f f)); DATA(insert OID = 0 ( 1263 oid 26 0 4 -2 0 -1 t f i f f)); DATA(insert OID = 0 ( 1263 xmin 28 0 4 -3 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1263 cmin 29 0 2 -4 0 -1 t f s f f)); +DATA(insert OID = 0 ( 1263 cmin 29 0 4 -4 0 -1 t f i f f)); DATA(insert OID = 0 ( 1263 xmax 28 0 4 -5 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1263 cmax 29 0 2 -6 0 -1 t f s f f)); -DATA(insert OID = 0 ( 1263 chain 27 0 6 -7 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1263 anchor 27 0 6 -8 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1263 tmin 702 0 4 -9 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1263 tmax 702 0 4 -10 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1263 vtype 18 0 1 -11 0 -1 t f c f f)); +DATA(insert OID = 0 ( 1263 cmax 29 0 4 -6 0 -1 t f i f f)); /* ---------------- * pg_attrdef @@ -512,14 +457,9 @@ DATA(insert OID = 0 ( 1215 adsrc 25 0 -1 4 0 -1 f f i f f)); DATA(insert OID = 0 ( 1215 ctid 27 0 6 -1 0 -1 f f i f f)); DATA(insert OID = 0 ( 1215 oid 26 0 4 -2 0 -1 t f i f f)); DATA(insert OID = 0 ( 1215 xmin 28 0 4 -3 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1215 cmin 29 0 2 -4 0 -1 t f s f f)); +DATA(insert OID = 0 ( 1215 cmin 29 0 4 -4 0 -1 t f i f f)); DATA(insert OID = 0 ( 1215 xmax 28 0 4 -5 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1215 cmax 29 0 2 -6 0 -1 t f s f f)); -DATA(insert OID = 0 ( 1215 chain 27 0 6 -7 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1215 anchor 27 0 6 -8 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1215 tmin 702 0 4 -9 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1215 tmax 702 0 4 -10 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1215 vtype 18 0 1 -11 0 -1 t f c f f)); +DATA(insert OID = 0 ( 1215 cmax 29 0 4 -6 0 -1 t f i f f)); /* ---------------- * pg_relcheck @@ -532,14 +472,9 @@ DATA(insert OID = 0 ( 1216 rcsrc 25 0 -1 4 0 -1 f f i f f)); DATA(insert OID = 0 ( 1216 ctid 27 0 6 -1 0 -1 f f i f f)); DATA(insert OID = 0 ( 1216 oid 26 0 4 -2 0 -1 t f i f f)); DATA(insert OID = 0 ( 1216 xmin 28 0 4 -3 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1216 cmin 29 0 2 -4 0 -1 t f s f f)); +DATA(insert OID = 0 ( 1216 cmin 29 0 4 -4 0 -1 t f i f f)); DATA(insert OID = 0 ( 1216 xmax 28 0 4 -5 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1216 cmax 29 0 2 -6 0 -1 t f s f f)); -DATA(insert OID = 0 ( 1216 chain 27 0 6 -7 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1216 anchor 27 0 6 -8 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1216 tmin 702 0 4 -9 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1216 tmax 702 0 4 -10 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1216 vtype 18 0 1 -11 0 -1 t f c f f)); +DATA(insert OID = 0 ( 1216 cmax 29 0 4 -6 0 -1 t f i f f)); /* ---------------- * pg_trigger @@ -555,14 +490,9 @@ DATA(insert OID = 0 ( 1219 tgargs 17 0 -1 7 0 -1 f f i f f)); DATA(insert OID = 0 ( 1219 ctid 27 0 6 -1 0 -1 f f i f f)); DATA(insert OID = 0 ( 1219 oid 26 0 4 -2 0 -1 t f i f f)); DATA(insert OID = 0 ( 1219 xmin 28 0 4 -3 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1219 cmin 29 0 2 -4 0 -1 t f s f f)); +DATA(insert OID = 0 ( 1219 cmin 29 0 4 -4 0 -1 t f i f f)); DATA(insert OID = 0 ( 1219 xmax 28 0 4 -5 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1219 cmax 29 0 2 -6 0 -1 t f s f f)); -DATA(insert OID = 0 ( 1219 chain 27 0 6 -7 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1219 anchor 27 0 6 -8 0 -1 f f i f f)); -DATA(insert OID = 0 ( 1219 tmin 702 0 4 -9 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1219 tmax 702 0 4 -10 0 -1 t f i f f)); -DATA(insert OID = 0 ( 1219 vtype 18 0 1 -11 0 -1 t f c f f)); +DATA(insert OID = 0 ( 1219 cmax 29 0 4 -6 0 -1 t f i f f)); /* ---------------- * pg_hosts - this relation is used to store host based authentication @@ -596,15 +526,4 @@ DATA(insert OID = 0 ( 1264 varfoo 26 0 4 1 0 -1 t f i f f)); DATA(insert OID = 0 ( 1269 logfoo 26 0 4 1 0 -1 t f i f f)); -/* ---------------- - * pg_time - this relation is modified by special purpose access - * method code. The following is garbage but is needed - * so that the reldesc code works properly. - * ---------------- - */ -#define Schema_pg_time \ -{ 1271l, {"timefoo"}, 26l, 0l, 4, 1, 0l, -1l, '\001', '\0', 'i', '\0', '\0' } - -DATA(insert OID = 0 ( 1271 timefoo 26 0 4 1 0 -1 t f i f f)); - #endif /* PG_ATTRIBUTE_H */ diff --git a/src/include/catalog/pg_class.h b/src/include/catalog/pg_class.h index 83751152897..dad9f5c9541 100644 --- a/src/include/catalog/pg_class.h +++ b/src/include/catalog/pg_class.h @@ -7,7 +7,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: pg_class.h,v 1.11 1997/09/08 02:35:03 momjian Exp $ + * $Id: pg_class.h,v 1.12 1997/11/02 15:26:59 vadim Exp $ * * NOTES * ``pg_relation'' is being replaced by ``pg_class''. currently @@ -141,7 +141,6 @@ DATA(insert OID = 1262 ( pg_database 88 PGUID 0 0 0 0 0 f t r n 3 0 0 0 f _nu DATA(insert OID = 1263 ( pg_defaults 89 PGUID 0 0 0 0 0 f t r n 2 0 0 0 f _null_ )); DATA(insert OID = 1264 ( pg_variable 90 PGUID 0 0 0 0 0 f t s n 2 0 0 0 f _null_ )); DATA(insert OID = 1269 ( pg_log 99 PGUID 0 0 0 0 0 f t s n 1 0 0 0 f _null_ )); -DATA(insert OID = 1271 ( pg_time 100 PGUID 0 0 0 0 0 f t s n 1 0 0 0 f _null_ )); DATA(insert OID = 1273 ( pg_hosts 101 PGUID 0 0 0 0 0 f t s n 3 0 0 0 f _null_ )); DATA(insert OID = 1215 ( pg_attrdef 109 PGUID 0 0 0 0 0 t t r n 4 0 0 0 f _null_ )); DATA(insert OID = 1216 ( pg_relcheck 110 PGUID 0 0 0 0 0 t t r n 4 0 0 0 f _null_ )); @@ -160,7 +159,6 @@ DATA(insert OID = 1219 ( pg_trigger 111 PGUID 0 0 0 0 0 t t r n 7 0 0 0 f _nu #define RelOid_pg_defaults 1263 #define RelOid_pg_variable 1264 #define RelOid_pg_log 1269 -#define RelOid_pg_time 1271 #define RelOid_pg_hosts 1273 #define RelOid_pg_attrdef 1215 #define RelOid_pg_relcheck 1216 diff --git a/src/include/catalog/pg_time.h b/src/include/catalog/pg_time.h deleted file mode 100644 index 57675110372..00000000000 --- a/src/include/catalog/pg_time.h +++ /dev/null @@ -1,41 +0,0 @@ -/*------------------------------------------------------------------------- - * - * pg_time.h-- - * the system commit-time relation "pg_time" is not a "heap" relation. - * it is automatically created by the transam/ code and the - * information here is all bogus and is just here to make the - * relcache code happy. - * - * - * Copyright (c) 1994, Regents of the University of California - * - * $Id: pg_time.h,v 1.4 1997/09/08 02:35:28 momjian Exp $ - * - * NOTES - * The structures and macros used by the transam/ code - * to access pg_time should some day go here -cim 6/18/90 - * - *------------------------------------------------------------------------- - */ -#ifndef PG_TIME_H -#define PG_TIME_H - -/* ---------------- - * postgres.h contains the system type definintions and the - * CATALOG(), BOOTSTRAP and DATA() sugar words so this file - * can be read by both genbki.sh and the C compiler. - * ---------------- - */ - -CATALOG(pg_time) BOOTSTRAP -{ - Oid timefoo; -} FormData_pg_time; - -typedef FormData_pg_time *Form_pg_time; - -#define Natts_pg_time 1 -#define Anum_pg_time_timefoo 1 - - -#endif /* PG_TIME_H */ diff --git a/src/include/catalog/pg_type.h b/src/include/catalog/pg_type.h index bbddb4da8ae..0fde6eafe13 100644 --- a/src/include/catalog/pg_type.h +++ b/src/include/catalog/pg_type.h @@ -7,7 +7,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: pg_type.h,v 1.19 1997/09/08 21:51:31 momjian Exp $ + * $Id: pg_type.h,v 1.20 1997/11/02 15:27:03 vadim Exp $ * * NOTES * the genbki.sh script reads this file and generates .bki @@ -186,7 +186,7 @@ DATA(insert OID = 26 ( oid PGUID 4 10 t b t \054 0 0 int4in int4out int4 DATA(insert OID = 27 ( tid PGUID 6 19 f b t \054 0 0 tidin tidout tidin tidout i _null_ )); DATA(insert OID = 28 ( xid PGUID 4 12 t b t \054 0 0 xidin xidout xidin xidout i _null_ )); -DATA(insert OID = 29 ( cid PGUID 2 3 t b t \054 0 0 cidin cidout cidin cidout s _null_ )); +DATA(insert OID = 29 ( cid PGUID 4 10 t b t \054 0 0 cidin cidout cidin cidout i _null_ )); DATA(insert OID = 30 ( oid8 PGUID 32 89 f b t \054 0 26 oid8in oid8out oid8in oid8out i _null_ )); DATA(insert OID = 32 ( SET PGUID -1 -1 f r t \054 0 -1 textin textout textin textout i _null_ )); @@ -206,7 +206,6 @@ DATA(insert OID = 99 ( pg_log PGUID 1 1 t b t \054 1269 0 foo bar foo bar c _n /* OIDS 100 - 199 */ -DATA(insert OID = 100 ( pg_time PGUID 1 1 t b t \054 1271 0 foo bar foo bar c _null_)); DATA(insert OID = 101 ( pg_hosts PGUID 1 1 t b t \054 1273 0 foo bar foo bar c _null_)); DATA(insert OID = 109 ( pg_attrdef PGUID 1 1 t b t \054 1215 0 foo bar foo bar c _null_)); DATA(insert OID = 110 ( pg_relcheck PGUID 1 1 t b t \054 1216 0 foo bar foo bar c _null_)); diff --git a/src/include/parser/parse_query.h b/src/include/parser/parse_query.h index 7775ec0260f..fbc06f2d7b0 100644 --- a/src/include/parser/parse_query.h +++ b/src/include/parser/parse_query.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: parse_query.h,v 1.12 1997/09/08 21:53:39 momjian Exp $ + * $Id: parse_query.h,v 1.13 1997/11/02 15:27:08 vadim Exp $ * *------------------------------------------------------------------------- */ @@ -34,9 +34,6 @@ addRangeTableEntry(ParseState *pstate, extern List * expandAll(ParseState *pstate, char *relname, char *refname, int *this_resno); -extern TimeQual -makeTimeRange(char *datestring1, char *datestring2, - int timecode); extern Expr *make_op(char *opname, Node *ltree, Node *rtree); extern Oid find_atttype(Oid relid, char *attrname); diff --git a/src/include/postgres.h b/src/include/postgres.h index 37d966cf2f4..504bb1aaad8 100644 --- a/src/include/postgres.h +++ b/src/include/postgres.h @@ -6,7 +6,7 @@ * * Copyright (c) 1995, Regents of the University of California * - * $Id: postgres.h,v 1.9 1997/09/08 21:50:28 momjian Exp $ + * $Id: postgres.h,v 1.10 1997/11/02 15:26:28 vadim Exp $ * *------------------------------------------------------------------------- */ @@ -163,7 +163,7 @@ typedef struct OidNameData *OidName; typedef uint32 TransactionId; #define InvalidTransactionId 0 -typedef uint16 CommandId; +typedef uint32 CommandId; #define FirstCommandId 0 diff --git a/src/include/utils/tqual.h b/src/include/utils/tqual.h index 11253891a98..e07750bd3d6 100644 --- a/src/include/utils/tqual.h +++ b/src/include/utils/tqual.h @@ -1,16 +1,12 @@ /*------------------------------------------------------------------------- * * tqual.h-- - * POSTGRES time qualification definitions. + * POSTGRES "time" qualification definitions. * * * Copyright (c) 1994, Regents of the University of California * - * $Id: tqual.h,v 1.9 1997/09/08 21:55:19 momjian Exp $ - * - * NOTE - * It may be desirable to allow time qualifications to indicate - * relative times. + * $Id: tqual.h,v 1.10 1997/11/02 15:27:14 vadim Exp $ * *------------------------------------------------------------------------- */ @@ -19,11 +15,6 @@ #include <access/htup.h> -typedef struct TimeQualSpace -{ - char data[12]; -} TimeQualSpace; - typedef Pointer TimeQual; /* Tuples valid as of StartTransactionCommand */ @@ -35,10 +26,6 @@ extern TimeQual SelfTimeQual; extern void setheapoverride(bool on); extern bool heapisoverride(void); -extern TimeQual TimeFormSnapshotTimeQual(AbsoluteTime time); -extern TimeQual -TimeFormRangedTimeQual(AbsoluteTime startTime, - AbsoluteTime endTime); extern bool HeapTupleSatisfiesTimeQual(HeapTuple tuple, TimeQual qual); |