1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-03 15:22:11 +03:00

Remove all time travel stuff. Small parser cleanup.

This commit is contained in:
Bruce Momjian
1997-11-20 23:24:03 +00:00
parent e075271c17
commit e9e1ff226f
66 changed files with 574 additions and 899 deletions

View File

@@ -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));
}

View File

@@ -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;