From e9e1ff226f285bc7b488e670be4b8220cdba4a53 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Thu, 20 Nov 1997 23:24:03 +0000 Subject: Remove all time travel stuff. Small parser cleanup. --- src/include/access/heapam.h | 7 +++---- src/include/access/relscan.h | 4 ++-- src/include/access/valid.h | 6 +++--- src/include/executor/executor.h | 6 +++--- src/include/nodes/parsenodes.h | 15 +-------------- src/include/optimizer/prep.h | 8 +------- src/include/parser/parse_query.h | 13 ++++--------- src/include/parser/sysfunc.h | 9 --------- src/include/utils/tqual.h | 10 ++-------- 9 files changed, 19 insertions(+), 59 deletions(-) (limited to 'src/include') diff --git a/src/include/access/heapam.h b/src/include/access/heapam.h index a66fcab073..cb9a0a889f 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.21 1997/11/02 15:26:37 vadim Exp $ + * $Id: heapam.h,v 1.22 1997/11/20 23:23:31 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -123,13 +123,12 @@ extern Relation heap_openr(char *relationName); extern void heap_close(Relation relation); extern HeapScanDesc heap_beginscan(Relation relation, int atend, - TimeQual timeQual, unsigned nkeys, ScanKey key); + bool seeself, unsigned nkeys, ScanKey key); extern void heap_rescan(HeapScanDesc sdesc, bool scanFromEnd, ScanKey key); extern void heap_endscan(HeapScanDesc sdesc); extern HeapTuple heap_getnext(HeapScanDesc scandesc, int backw, Buffer *b); extern HeapTuple -heap_fetch(Relation relation, TimeQual timeQual, - ItemPointer tid, Buffer *b); +heap_fetch(Relation relation, bool seeself, ItemPointer tid, Buffer *b); extern Oid heap_insert(Relation relation, HeapTuple tup); extern int heap_delete(Relation relation, ItemPointer tid); extern int diff --git a/src/include/access/relscan.h b/src/include/access/relscan.h index 8b2eb5ed0d..78c91dd250 100644 --- a/src/include/access/relscan.h +++ b/src/include/access/relscan.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: relscan.h,v 1.8 1997/09/08 21:50:56 momjian Exp $ + * $Id: relscan.h,v 1.9 1997/11/20 23:23:33 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -33,7 +33,7 @@ typedef struct HeapScanDescData ItemPointerData rs_mntid; /* marked next tid */ ItemPointerData rs_mcd; /* marked current delta XXX ??? */ bool rs_atend; /* restart scan at end? */ - TimeQual rs_tr; /* time qualification */ + bool rs_seeself; /* see self or not */ uint16 rs_cdelta; /* current delta in chain */ uint16 rs_nkeys; /* number of attributes in keys */ ScanKey rs_key; /* key descriptors */ diff --git a/src/include/access/valid.h b/src/include/access/valid.h index d7707fa495..fec88923db 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.9 1997/11/02 15:26:46 vadim Exp $ + * $Id: valid.h,v 1.10 1997/11/20 23:23:35 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -113,7 +113,7 @@ do \ relation, \ buffer, \ disk_page, \ - qual, \ + seeself, \ nKeys, \ key, \ result) \ @@ -144,7 +144,7 @@ do \ { \ uint16 _infomask = _tuple->t_infomask; \ \ - _res = HeapTupleSatisfiesTimeQual(_tuple, (qual)); \ + _res = HeapTupleSatisfiesVisibility(_tuple, (seeself)); \ if (_tuple->t_infomask != _infomask) \ SetBufferCommitInfoNeedsSave(buffer); \ if (_res) \ diff --git a/src/include/executor/executor.h b/src/include/executor/executor.h index 08a5f4d381..0e20bda73e 100644 --- a/src/include/executor/executor.h +++ b/src/include/executor/executor.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: executor.h,v 1.14 1997/09/27 14:37:21 momjian Exp $ + * $Id: executor.h,v 1.15 1997/11/20 23:23:39 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -28,8 +28,8 @@ */ extern void ExecOpenScanR(Oid relOid, int nkeys, ScanKey skeys, bool isindex, - ScanDirection dir, TimeQual timeRange, - Relation *returnRelation, Pointer *returnScanDesc); + ScanDirection dir, Relation *returnRelation, + Pointer *returnScanDesc); extern void ExecCloseR(Plan *node); extern void ExecReScan(Plan *node, ExprContext *exprCtxt, Plan *parent); extern HeapScanDesc diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h index 6fd9631f67..30625da1da 100644 --- a/src/include/nodes/parsenodes.h +++ b/src/include/nodes/parsenodes.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: parsenodes.h,v 1.30 1997/11/07 06:38:38 thomas Exp $ + * $Id: parsenodes.h,v 1.31 1997/11/20 23:23:44 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -785,16 +785,6 @@ typedef struct ParamString char *val; } ParamString; -/* - * TimeRange - specifies a time range - */ -typedef struct TimeRange -{ - NodeTag type; - char *startDate; - char *endDate; /* snapshot if NULL */ -} TimeRange; - /* * RelExpr - relation expressions */ @@ -803,7 +793,6 @@ typedef struct RelExpr NodeTag type; char *relname; /* the relation name */ bool inh; /* inheritance query */ - TimeRange *timeRange; /* the time range */ } RelExpr; /* @@ -887,14 +876,12 @@ typedef struct RangeTblEntry { NodeTag type; char *relname; /* real name of the relation */ - TimeRange *timeRange; /* time range */ char *refname; /* the reference name (specified in the * from clause) */ Oid relid; bool inh; /* inheritance? */ bool archive; /* filled in by plan_archive */ bool inFromCl; /* comes from From Clause */ - TimeQual timeQual; /* filled in by pg_plan */ } RangeTblEntry; /* diff --git a/src/include/optimizer/prep.h b/src/include/optimizer/prep.h index 69db9b61ce..ca42b88dff 100644 --- a/src/include/optimizer/prep.h +++ b/src/include/optimizer/prep.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: prep.h,v 1.5 1997/09/08 21:53:30 momjian Exp $ + * $Id: prep.h,v 1.6 1997/11/20 23:23:48 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -16,12 +16,6 @@ #include #include -/* - * prototypes for archive.h - */ -extern void plan_archive(List *rt); -extern List *find_archive_rels(Oid relid); - /* * prototypes for prepqual.h */ diff --git a/src/include/parser/parse_query.h b/src/include/parser/parse_query.h index fbc06f2d7b..0a7d534b85 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.13 1997/11/02 15:27:08 vadim Exp $ + * $Id: parse_query.h,v 1.14 1997/11/20 23:23:53 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -29,8 +29,7 @@ extern int refnameRangeTablePosn(List *rtable, char *refname); extern RangeTblEntry * addRangeTableEntry(ParseState *pstate, char *relname, char *refname, - bool inh, bool inFromCl, - TimeRange *timeRange); + bool inh, bool inFromCl); extern List * expandAll(ParseState *pstate, char *relname, char *refname, int *this_resno); @@ -49,13 +48,9 @@ extern Const *make_const(Value *value); extern void param_type_init(Oid *typev, int nargs); extern Oid param_type(int t); -/* parser.c (was ylib.c) */ extern QueryTreeList *parser(char *str, Oid *typev, int nargs); -extern Node *parser_typecast(Value *expr, TypeName *typename, int typlen); -extern Node *parser_typecast2(Node *expr, Oid exprType, Type tp, int typlen); -extern Aggreg *ParseAgg(char *aggname, Oid basetype, Node *target); -extern void -handleTargetColname(ParseState *pstate, char **resname, + +extern void handleTargetColname(ParseState *pstate, char **resname, char *refname, char *colname); /* diff --git a/src/include/parser/sysfunc.h b/src/include/parser/sysfunc.h index 6ba643c005..e69de29bb2 100644 --- a/src/include/parser/sysfunc.h +++ b/src/include/parser/sysfunc.h @@ -1,9 +0,0 @@ -/*------------------------------------------------------------------------- - * - * sysfunc.h-- - * support for system functions - * - * ------------------------------------------------------------------------- - */ - -extern char *SystemFunctionHandler(char *funct); diff --git a/src/include/utils/tqual.h b/src/include/utils/tqual.h index e07750bd3d..6ee27af2c2 100644 --- a/src/include/utils/tqual.h +++ b/src/include/utils/tqual.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: tqual.h,v 1.10 1997/11/02 15:27:14 vadim Exp $ + * $Id: tqual.h,v 1.11 1997/11/20 23:24:03 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -15,18 +15,12 @@ #include -typedef Pointer TimeQual; - -/* Tuples valid as of StartTransactionCommand */ -#define NowTimeQual ((TimeQual) NULL) - /* As above, plus updates in this command */ -extern TimeQual SelfTimeQual; extern void setheapoverride(bool on); extern bool heapisoverride(void); -extern bool HeapTupleSatisfiesTimeQual(HeapTuple tuple, TimeQual qual); +extern bool HeapTupleSatisfiesVisibility(HeapTuple tuple, bool seeself); #endif /* TQUAL_H */ -- cgit v1.2.1