mirror of
https://github.com/postgres/postgres.git
synced 2025-11-10 17:42:29 +03:00
Remove all time travel stuff. Small parser cleanup.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/not_in.c,v 1.6 1997/09/12 04:08:21 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/not_in.c,v 1.7 1997/11/20 23:22:57 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -72,7 +72,7 @@ int4notin(int16 not_in_arg, char *relation_and_attr)
|
||||
/* the last argument should be a ScanKey, not an integer! - jolly */
|
||||
/* it looks like the arguments are out of order, too */
|
||||
/* but skeyData is never initialized! does this work?? - ay 2/95 */
|
||||
scan_descriptor = heap_beginscan(relation_to_scan, false, NULL, 0,
|
||||
scan_descriptor = heap_beginscan(relation_to_scan, false, false, 0,
|
||||
&skeyData);
|
||||
|
||||
retval = true;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/regproc.c,v 1.9 1997/11/15 16:32:01 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/regproc.c,v 1.10 1997/11/20 23:23:00 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -55,7 +55,7 @@ regprocin(char *proname)
|
||||
(RegProcedure) F_CHAR16EQ,
|
||||
(Datum) proname);
|
||||
|
||||
procscan = heap_beginscan(proc, 0, NowTimeQual, 1, &key);
|
||||
procscan = heap_beginscan(proc, 0, false, 1, &key);
|
||||
if (!HeapScanIsValid(procscan))
|
||||
{
|
||||
heap_close(proc);
|
||||
@@ -114,7 +114,7 @@ regprocout(RegProcedure proid)
|
||||
(RegProcedure) F_INT4EQ,
|
||||
(Datum) proid);
|
||||
|
||||
procscan = heap_beginscan(proc, 0, NowTimeQual, 1, &key);
|
||||
procscan = heap_beginscan(proc, 0, false, 1, &key);
|
||||
if (!HeapScanIsValid(procscan))
|
||||
{
|
||||
heap_close(proc);
|
||||
@@ -192,7 +192,7 @@ oid8types(Oid (*oidArray)[])
|
||||
(RegProcedure) F_INT4EQ,
|
||||
(Datum) *sp);
|
||||
|
||||
typescan = heap_beginscan(type, 0, NowTimeQual, 1, &key);
|
||||
typescan = heap_beginscan(type, 0, false, 1, &key);
|
||||
if (!HeapScanIsValid(typescan))
|
||||
{
|
||||
heap_close(type);
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.10 1997/09/08 02:31:00 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.11 1997/11/20 23:23:03 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -350,7 +350,7 @@ gethilokey(Oid relid,
|
||||
key[0].sk_argument = ObjectIdGetDatum(relid);
|
||||
key[1].sk_argument = Int16GetDatum((int16) attnum);
|
||||
key[2].sk_argument = ObjectIdGetDatum(opid);
|
||||
sdesc = heap_beginscan(rdesc, 0, NowTimeQual, 3, key);
|
||||
sdesc = heap_beginscan(rdesc, 0, false, 3, key);
|
||||
tuple = heap_getnext(sdesc, 0, (Buffer *) NULL);
|
||||
if (!HeapTupleIsValid(tuple))
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/sets.c,v 1.7 1997/09/08 02:31:01 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/sets.c,v 1.8 1997/11/20 23:23:05 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -121,7 +121,7 @@ SetDefine(char *querystr, char *typename)
|
||||
oidKey[0].sk_argument = ObjectIdGetDatum(setoid);
|
||||
pg_proc_scan = heap_beginscan(procrel,
|
||||
0,
|
||||
SelfTimeQual,
|
||||
true,
|
||||
1,
|
||||
oidKey);
|
||||
tup = heap_getnext(pg_proc_scan, 0, &buffer);
|
||||
|
||||
4
src/backend/utils/cache/catcache.c
vendored
4
src/backend/utils/cache/catcache.c
vendored
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/cache/catcache.c,v 1.16 1997/09/18 20:22:18 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/cache/catcache.c,v 1.17 1997/11/20 23:23:08 momjian Exp $
|
||||
*
|
||||
* Notes:
|
||||
* XXX This needs to use exception.h to handle recovery when
|
||||
@@ -973,7 +973,7 @@ SearchSysCache(struct catcache * cache,
|
||||
*/
|
||||
MemoryContextSwitchTo(oldcxt);
|
||||
|
||||
sd = heap_beginscan(relation, 0, NowTimeQual,
|
||||
sd = heap_beginscan(relation, 0, false,
|
||||
cache->cc_nkeys, cache->cc_skey);
|
||||
|
||||
/* should this buffer be ReleaseBuffer'd? --djm 8/20/96 */
|
||||
|
||||
12
src/backend/utils/cache/relcache.c
vendored
12
src/backend/utils/cache/relcache.c
vendored
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.28 1997/11/17 16:59:25 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.29 1997/11/20 23:23:11 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -383,7 +383,7 @@ scan_pg_rel_seq(RelationBuildDescInfo buildinfo)
|
||||
if (!IsInitProcessingMode())
|
||||
RelationSetLockForRead(pg_class_desc);
|
||||
pg_class_scan =
|
||||
heap_beginscan(pg_class_desc, 0, NowTimeQual, 1, &key);
|
||||
heap_beginscan(pg_class_desc, 0, false, 1, &key);
|
||||
pg_class_tuple = heap_getnext(pg_class_scan, 0, &buf);
|
||||
|
||||
/* ----------------
|
||||
@@ -555,7 +555,7 @@ build_tupdesc_seq(RelationBuildDescInfo buildinfo,
|
||||
*/
|
||||
pg_attribute_desc = heap_openr(AttributeRelationName);
|
||||
pg_attribute_scan =
|
||||
heap_beginscan(pg_attribute_desc, 0, NowTimeQual, 1, &key);
|
||||
heap_beginscan(pg_attribute_desc, 0, false, 1, &key);
|
||||
|
||||
/* ----------------
|
||||
* add attribute data to relation->rd_att
|
||||
@@ -726,7 +726,7 @@ RelationBuildRuleLock(Relation relation)
|
||||
*/
|
||||
pg_rewrite_desc = heap_openr(RewriteRelationName);
|
||||
pg_rewrite_scan =
|
||||
heap_beginscan(pg_rewrite_desc, 0, NowTimeQual, 1, &key);
|
||||
heap_beginscan(pg_rewrite_desc, 0, false, 1, &key);
|
||||
pg_rewrite_tupdesc =
|
||||
RelationGetTupleDescriptor(pg_rewrite_desc);
|
||||
|
||||
@@ -1728,7 +1728,7 @@ AttrDefaultFetch(Relation relation)
|
||||
break;
|
||||
|
||||
iptr = &indexRes->heap_iptr;
|
||||
tuple = heap_fetch(adrel, NowTimeQual, iptr, &buffer);
|
||||
tuple = heap_fetch(adrel, false, iptr, &buffer);
|
||||
pfree(indexRes);
|
||||
if (!HeapTupleIsValid(tuple))
|
||||
continue;
|
||||
@@ -1817,7 +1817,7 @@ RelCheckFetch(Relation relation)
|
||||
break;
|
||||
|
||||
iptr = &indexRes->heap_iptr;
|
||||
tuple = heap_fetch(rcrel, NowTimeQual, iptr, &buffer);
|
||||
tuple = heap_fetch(rcrel, false, iptr, &buffer);
|
||||
pfree(indexRes);
|
||||
if (!HeapTupleIsValid(tuple))
|
||||
continue;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/misc/Attic/database.c,v 1.2 1997/11/10 15:14:34 thomas Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/misc/Attic/database.c,v 1.3 1997/11/20 23:23:16 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -59,7 +59,7 @@ GetDatabaseInfo(char *name, Oid *owner, char *path)
|
||||
ScanKeyEntryInitialize(&scanKey, 0, Anum_pg_database_datname,
|
||||
NameEqualRegProcedure, NameGetDatum(name));
|
||||
|
||||
scan = heap_beginscan(dbrel, 0, NowTimeQual, 1, &scanKey);
|
||||
scan = heap_beginscan(dbrel, 0, false, 1, &scanKey);
|
||||
if (!HeapScanIsValid(scan))
|
||||
elog(WARN, "GetDatabaseInfo: cannot begin scan of %s", DatabaseRelationName);
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/time/tqual.c,v 1.9 1997/11/02 15:26:17 vadim Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/time/tqual.c,v 1.10 1997/11/20 23:23:20 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -25,9 +25,6 @@
|
||||
|
||||
#include "utils/tqual.h"
|
||||
|
||||
static int4 SelfTimeQualData;
|
||||
TimeQual SelfTimeQual = (TimeQual) &SelfTimeQualData;
|
||||
|
||||
extern bool PostgresIsInitialized;
|
||||
|
||||
/*
|
||||
@@ -82,33 +79,23 @@ static bool HeapTupleSatisfiesItself(HeapTuple tuple);
|
||||
static bool HeapTupleSatisfiesNow(HeapTuple tuple);
|
||||
|
||||
/*
|
||||
* HeapTupleSatisfiesTimeQual --
|
||||
* HeapTupleSatisfiesScope --
|
||||
* True iff heap tuple satsifies a time qual.
|
||||
*
|
||||
* Note:
|
||||
* Assumes heap tuple is valid.
|
||||
* Assumes time qual is valid.
|
||||
*/
|
||||
bool
|
||||
HeapTupleSatisfiesTimeQual(HeapTuple tuple, TimeQual qual)
|
||||
HeapTupleSatisfiesVisibility(HeapTuple tuple, bool seeself)
|
||||
{
|
||||
|
||||
if (TransactionIdEquals(tuple->t_xmax, AmiTransactionId))
|
||||
return (false);
|
||||
|
||||
if (qual == SelfTimeQual || heapisoverride())
|
||||
{
|
||||
if (seeself == true || heapisoverride())
|
||||
return (HeapTupleSatisfiesItself(tuple));
|
||||
}
|
||||
|
||||
if (qual == NowTimeQual)
|
||||
{
|
||||
else
|
||||
return (HeapTupleSatisfiesNow(tuple));
|
||||
}
|
||||
|
||||
elog(WARN, "HeapTupleSatisfiesTimeQual: illegal time qual");
|
||||
|
||||
return (false);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user