mirror of
https://github.com/postgres/postgres.git
synced 2025-06-26 12:21:12 +03:00
Remove all time travel stuff. Small parser cleanup.
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.11 1997/09/08 21:44:55 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.12 1997/11/20 23:21:47 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -998,7 +998,7 @@ clause_pred_clause_test(Expr *predicate, Node *clause)
|
||||
* will be used to find the associated strategy numbers for the test.
|
||||
* --Nels, Jan '93
|
||||
*/
|
||||
scan = heap_beginscan(relation, false, NowTimeQual, 2, entry);
|
||||
scan = heap_beginscan(relation, false, false, 2, entry);
|
||||
tuple = heap_getnext(scan, false, (Buffer *) NULL);
|
||||
if (!HeapTupleIsValid(tuple))
|
||||
{
|
||||
@ -1029,7 +1029,7 @@ clause_pred_clause_test(Expr *predicate, Node *clause)
|
||||
ObjectIdEqualRegProcedure,
|
||||
ObjectIdGetDatum(clause_op));
|
||||
|
||||
scan = heap_beginscan(relation, false, NowTimeQual, 3, entry);
|
||||
scan = heap_beginscan(relation, false, false, 3, entry);
|
||||
tuple = heap_getnext(scan, false, (Buffer *) NULL);
|
||||
if (!HeapTupleIsValid(tuple))
|
||||
{
|
||||
@ -1061,7 +1061,7 @@ clause_pred_clause_test(Expr *predicate, Node *clause)
|
||||
Integer16EqualRegProcedure,
|
||||
Int16GetDatum(test_strategy));
|
||||
|
||||
scan = heap_beginscan(relation, false, NowTimeQual, 3, entry);
|
||||
scan = heap_beginscan(relation, false, false, 3, entry);
|
||||
tuple = heap_getnext(scan, false, (Buffer *) NULL);
|
||||
if (!HeapTupleIsValid(tuple))
|
||||
{
|
||||
|
@ -1,69 +0,0 @@
|
||||
/*-------------------------------------------------------------------------
|
||||
*
|
||||
* archive.c--
|
||||
* Support for planning scans on archived relations
|
||||
*
|
||||
* Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/prep/Attic/archive.c,v 1.4 1997/09/08 21:45:29 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
#include <stdio.h> /* for sprintf() */
|
||||
#include <sys/types.h> /* for u_int in relcache.h */
|
||||
#include "postgres.h"
|
||||
|
||||
#include "utils/rel.h"
|
||||
#include "utils/elog.h"
|
||||
#include "utils/palloc.h"
|
||||
#include "utils/relcache.h"
|
||||
#include "catalog/pg_class.h"
|
||||
#include "nodes/pg_list.h"
|
||||
#include "nodes/parsenodes.h"
|
||||
#include "optimizer/prep.h"
|
||||
#include "commands/creatinh.h"
|
||||
|
||||
void
|
||||
plan_archive(List *rt)
|
||||
{
|
||||
List *rtitem;
|
||||
RangeTblEntry *rte;
|
||||
TimeRange *trange;
|
||||
Relation r;
|
||||
Oid reloid;
|
||||
|
||||
foreach(rtitem, rt)
|
||||
{
|
||||
rte = lfirst(rtitem);
|
||||
trange = rte->timeRange;
|
||||
if (trange)
|
||||
{
|
||||
reloid = rte->relid;
|
||||
r = RelationIdGetRelation(reloid);
|
||||
if (r->rd_rel->relarch != 'n')
|
||||
{
|
||||
rte->archive = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* find_archive_rels -- Given a particular relid, find the archive
|
||||
* relation's relid.
|
||||
*/
|
||||
List *
|
||||
find_archive_rels(Oid relid)
|
||||
{
|
||||
Relation arel;
|
||||
char *arelName;
|
||||
|
||||
arelName = MakeArchiveName(relid);
|
||||
arel = RelationNameGetRelation(arelName);
|
||||
pfree(arelName);
|
||||
|
||||
return lconsi(arel->rd_id, lconsi(relid, NIL));
|
||||
}
|
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepunion.c,v 1.6 1997/09/08 21:45:37 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepunion.c,v 1.7 1997/11/20 23:21:57 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -178,10 +178,6 @@ plan_union_queries(Index rt_index,
|
||||
union_relids = VersionGetParents(rt_entry->relid);
|
||||
break;
|
||||
|
||||
case ARCHIVE_FLAG:
|
||||
union_relids = find_archive_rels(rt_entry->relid);
|
||||
break;
|
||||
|
||||
default:
|
||||
/* do nothing */
|
||||
break;
|
||||
|
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/plancat.c,v 1.10 1997/09/18 20:20:50 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/plancat.c,v 1.11 1997/11/20 23:22:01 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -148,7 +148,7 @@ index_info(Query *root, bool first, int relid, IdxInfoRetval *info)
|
||||
ObjectIdGetDatum(indrelid));
|
||||
|
||||
relation = heap_openr(IndexRelationName);
|
||||
scan = heap_beginscan(relation, 0, NowTimeQual,
|
||||
scan = heap_beginscan(relation, 0, false,
|
||||
1, &indexKey);
|
||||
}
|
||||
if (!HeapScanIsValid(scan))
|
||||
@ -420,7 +420,7 @@ find_inheritance_children(Oid inhparent)
|
||||
|
||||
key[0].sk_argument = ObjectIdGetDatum((Oid) inhparent);
|
||||
relation = heap_openr(InheritsRelationName);
|
||||
scan = heap_beginscan(relation, 0, NowTimeQual, 1, key);
|
||||
scan = heap_beginscan(relation, 0, false, 1, key);
|
||||
while (HeapTupleIsValid(inheritsTuple =
|
||||
heap_getnext(scan, 0,
|
||||
(Buffer *) NULL)))
|
||||
@ -455,7 +455,7 @@ VersionGetParents(Oid verrelid)
|
||||
fmgr_info(F_OIDEQ, &key[0].sk_func, &key[0].sk_nargs);
|
||||
relation = heap_openr(VersionRelationName);
|
||||
key[0].sk_argument = ObjectIdGetDatum(verrelid);
|
||||
scan = heap_beginscan(relation, 0, NowTimeQual, 1, key);
|
||||
scan = heap_beginscan(relation, 0, false, 1, key);
|
||||
for (;;)
|
||||
{
|
||||
versionTuple = heap_getnext(scan, 0,
|
||||
|
Reference in New Issue
Block a user