aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/command.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/commands/command.c')
-rw-r--r--src/backend/commands/command.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/backend/commands/command.c b/src/backend/commands/command.c
index 2b9f6a257b1..4fb184b7f6d 100644
--- a/src/backend/commands/command.c
+++ b/src/backend/commands/command.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.71 2000/04/12 17:14:57 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.72 2000/05/28 17:55:54 tgl Exp $
*
* NOTES
* The PortalExecutorHeapMemory crap needs to be eliminated
@@ -40,6 +40,7 @@
#include "optimizer/prep.h"
#include "utils/acl.h"
#include "utils/builtins.h"
+#include "utils/fmgroids.h"
#include "utils/syscache.h"
#include "utils/temprel.h"
#include "commands/trigger.h"
@@ -614,12 +615,15 @@ AlterTableAlterColumn(const char *relationName,
HeapTuple tuple;
attr_rel = heap_openr(AttributeRelationName, AccessExclusiveLock);
- ScanKeyEntryInitialize(&scankeys[0], 0x0, Anum_pg_attribute_attrelid, F_OIDEQ,
+ ScanKeyEntryInitialize(&scankeys[0], 0x0,
+ Anum_pg_attribute_attrelid, F_OIDEQ,
ObjectIdGetDatum(myrelid));
- ScanKeyEntryInitialize(&scankeys[1], 0x0, Anum_pg_attribute_attnum, F_INT2EQ,
+ ScanKeyEntryInitialize(&scankeys[1], 0x0,
+ Anum_pg_attribute_attnum, F_INT2EQ,
Int16GetDatum(attnum));
- ScanKeyEntryInitialize(&scankeys[2], 0x0, Anum_pg_attribute_atthasdef, F_BOOLEQ,
- TRUE);
+ ScanKeyEntryInitialize(&scankeys[2], 0x0,
+ Anum_pg_attribute_atthasdef, F_BOOLEQ,
+ Int32GetDatum(TRUE));
scan = heap_beginscan(attr_rel, false, SnapshotNow, 3, scankeys);
AssertState(scan != NULL);
@@ -661,9 +665,11 @@ drop_default(Oid relid, int16 attnum)
HeapTuple tuple;
attrdef_rel = heap_openr(AttrDefaultRelationName, AccessExclusiveLock);
- ScanKeyEntryInitialize(&scankeys[0], 0x0, Anum_pg_attrdef_adrelid, F_OIDEQ,
+ ScanKeyEntryInitialize(&scankeys[0], 0x0,
+ Anum_pg_attrdef_adrelid, F_OIDEQ,
ObjectIdGetDatum(relid));
- ScanKeyEntryInitialize(&scankeys[1], 0x0, Anum_pg_attrdef_adnum, F_INT2EQ,
+ ScanKeyEntryInitialize(&scankeys[1], 0x0,
+ Anum_pg_attrdef_adnum, F_INT2EQ,
Int16GetDatum(attnum));
scan = heap_beginscan(attrdef_rel, false, SnapshotNow, 2, scankeys);