mirror of
https://github.com/postgres/postgres.git
synced 2025-11-09 06:21:09 +03:00
Use Snapshot in heap access methods.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/remove.c,v 1.25 1998/06/15 19:28:16 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/remove.c,v 1.26 1998/07/27 19:37:53 vadim Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -97,7 +97,7 @@ RemoveOperator(char *operatorName, /* operator name */
|
||||
ObjectIdGetDatum(typeId2));
|
||||
|
||||
relation = heap_openr(OperatorRelationName);
|
||||
scan = heap_beginscan(relation, 0, false, 3, operatorKey);
|
||||
scan = heap_beginscan(relation, 0, SnapshotNow, 3, operatorKey);
|
||||
tup = heap_getnext(scan, 0, &buffer);
|
||||
if (HeapTupleIsValid(tup))
|
||||
{
|
||||
@@ -165,7 +165,7 @@ SingleOpOperatorRemove(Oid typeOid)
|
||||
for (i = 0; i < 3; ++i)
|
||||
{
|
||||
key[0].sk_attno = attnums[i];
|
||||
sdesc = heap_beginscan(rdesc, 0, false, 1, key);
|
||||
sdesc = heap_beginscan(rdesc, 0, SnapshotNow, 1, key);
|
||||
while (PointerIsValid(tup = heap_getnext(sdesc, 0, &buffer)))
|
||||
{
|
||||
ItemPointerCopy(&tup->t_ctid, &itemPointerData);
|
||||
@@ -214,7 +214,7 @@ AttributeAndRelationRemove(Oid typeOid)
|
||||
oidptr->next = NULL;
|
||||
optr = oidptr;
|
||||
rdesc = heap_openr(AttributeRelationName);
|
||||
sdesc = heap_beginscan(rdesc, 0, false, 1, key);
|
||||
sdesc = heap_beginscan(rdesc, 0, SnapshotNow, 1, key);
|
||||
while (PointerIsValid(tup = heap_getnext(sdesc, 0, &buffer)))
|
||||
{
|
||||
ItemPointerCopy(&tup->t_ctid, &itemPointerData);
|
||||
@@ -235,7 +235,7 @@ AttributeAndRelationRemove(Oid typeOid)
|
||||
while (PointerIsValid((char *) optr->next))
|
||||
{
|
||||
key[0].sk_argument = (Datum) (optr++)->reloid;
|
||||
sdesc = heap_beginscan(rdesc, 0, false, 1, key);
|
||||
sdesc = heap_beginscan(rdesc, 0, SnapshotNow, 1, key);
|
||||
tup = heap_getnext(sdesc, 0, &buffer);
|
||||
if (PointerIsValid(tup))
|
||||
{
|
||||
@@ -285,7 +285,7 @@ RemoveType(char *typeName) /* type name to be removed */
|
||||
|
||||
typeKey[0].sk_argument = PointerGetDatum(typeName);
|
||||
|
||||
scan = heap_beginscan(relation, 0, false, 1, typeKey);
|
||||
scan = heap_beginscan(relation, 0, SnapshotNow, 1, typeKey);
|
||||
tup = heap_getnext(scan, 0, (Buffer *) 0);
|
||||
if (!HeapTupleIsValid(tup))
|
||||
{
|
||||
@@ -303,7 +303,7 @@ RemoveType(char *typeName) /* type name to be removed */
|
||||
shadow_type = makeArrayTypeName(typeName);
|
||||
typeKey[0].sk_argument = NameGetDatum(shadow_type);
|
||||
|
||||
scan = heap_beginscan(relation, 0, false,
|
||||
scan = heap_beginscan(relation, 0, SnapshotNow,
|
||||
1, (ScanKey) typeKey);
|
||||
tup = heap_getnext(scan, 0, (Buffer *) 0);
|
||||
|
||||
@@ -390,7 +390,7 @@ RemoveFunction(char *functionName, /* function name to be removed */
|
||||
key[0].sk_nargs = key[0].sk_func.fn_nargs;
|
||||
|
||||
relation = heap_openr(ProcedureRelationName);
|
||||
scan = heap_beginscan(relation, 0, false, 1, key);
|
||||
scan = heap_beginscan(relation, 0, SnapshotNow, 1, key);
|
||||
|
||||
do
|
||||
{ /* hope this is ok because it's indexed */
|
||||
@@ -493,7 +493,7 @@ RemoveAggregate(char *aggName, char *aggType)
|
||||
ObjectIdGetDatum(basetypeID));
|
||||
|
||||
relation = heap_openr(AggregateRelationName);
|
||||
scan = heap_beginscan(relation, 0, false, 2, aggregateKey);
|
||||
scan = heap_beginscan(relation, 0, SnapshotNow, 2, aggregateKey);
|
||||
tup = heap_getnext(scan, 0, (Buffer *) 0);
|
||||
if (!HeapTupleIsValid(tup))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user