*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.180 2001/11/02 20:23:02 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.181 2001/11/12 00:00:55 tgl Exp $
*
*
* INTERFACE ROUTINES
0,
(AttrNumber) Anum_pg_class_relname,
(RegProcedure) F_NAMEEQ,
- (Datum) relname);
+ PointerGetDatum(relname));
/*
* begin the scan
0,
Anum_pg_attribute_atttypid,
F_OIDEQ,
- typoid);
+ ObjectIdGetDatum(typoid));
pg_attribute_scan = heap_beginscan(pg_attribute_desc,
0,
adrel = heap_openr(AttrDefaultRelationName, RowExclusiveLock);
ScanKeyEntryInitialize(&key, 0, Anum_pg_attrdef_adrelid,
- F_OIDEQ, RelationGetRelid(rel));
+ F_OIDEQ,
+ ObjectIdGetDatum(RelationGetRelid(rel)));
adscan = heap_beginscan(adrel, 0, SnapshotNow, 1, &key);
rcrel = heap_openr(RelCheckRelationName, RowExclusiveLock);
ScanKeyEntryInitialize(&key, 0, Anum_pg_relcheck_rcrelid,
- F_OIDEQ, RelationGetRelid(rel));
+ F_OIDEQ,
+ ObjectIdGetDatum(RelationGetRelid(rel)));
rcscan = heap_beginscan(rcrel, 0, SnapshotNow, 1, &key);
* constraint.
*/
ScanKeyEntryInitialize(&key[0], 0, Anum_pg_relcheck_rcrelid,
- F_OIDEQ, RelationGetRelid(rel));
+ F_OIDEQ,
+ ObjectIdGetDatum(RelationGetRelid(rel)));
ScanKeyEntryInitialize(&key[1], 0, Anum_pg_relcheck_rcname,
- F_NAMEEQ, PointerGetDatum(constrName));
+ F_NAMEEQ,
+ PointerGetDatum(constrName));
/* Begin scanning the heap */
rcscan = heap_beginscan(rcrel, 0, SnapshotNow, 2, key);
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/trigger.c,v 1.97 2001/10/25 05:49:25 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/trigger.c,v 1.98 2001/11/12 00:00:55 tgl Exp $
*
*-------------------------------------------------------------------------
*/
*/
tgrel = heap_openr(TriggerRelationName, RowExclusiveLock);
ScanKeyEntryInitialize(&key, 0, Anum_pg_trigger_tgrelid,
- F_OIDEQ, RelationGetRelid(rel));
+ F_OIDEQ,
+ ObjectIdGetDatum(RelationGetRelid(rel)));
tgscan = heap_beginscan(tgrel, 0, SnapshotNow, 1, &key);
while (HeapTupleIsValid(tuple = heap_getnext(tgscan, 0)))
{
*/
tgrel = heap_openr(TriggerRelationName, RowExclusiveLock);
ScanKeyEntryInitialize(&key, 0, Anum_pg_trigger_tgrelid,
- F_OIDEQ, RelationGetRelid(rel));
+ F_OIDEQ,
+ ObjectIdGetDatum(RelationGetRelid(rel)));
tgscan = heap_beginscan(tgrel, 0, SnapshotNow, 1, &key);
while (HeapTupleIsValid(tuple = heap_getnext(tgscan, 0)))
{
tgrel = heap_openr(TriggerRelationName, RowExclusiveLock);
ScanKeyEntryInitialize(&key, 0, Anum_pg_trigger_tgrelid,
- F_OIDEQ, RelationGetRelid(rel));
+ F_OIDEQ,
+ ObjectIdGetDatum(RelationGetRelid(rel)));
tgscan = heap_beginscan(tgrel, 0, SnapshotNow, 1, &key);
* Also drop all constraint triggers referencing this relation
*/
ScanKeyEntryInitialize(&key, 0, Anum_pg_trigger_tgconstrrelid,
- F_OIDEQ, RelationGetRelid(rel));
+ F_OIDEQ,
+ ObjectIdGetDatum(RelationGetRelid(rel)));
tgscan = heap_beginscan(tgrel, 0, SnapshotNow, 1, &key);
while (HeapTupleIsValid(tup = heap_getnext(tgscan, 0)))
build->tgnargs = pg_trigger->tgnargs;
memcpy(build->tgattr, &(pg_trigger->tgattr),
FUNC_MAX_ARGS * sizeof(int16));
- val = (struct varlena *) fastgetattr(htup,
- Anum_pg_trigger_tgargs,
- tgrel->rd_att, &isnull);
- if (isnull)
- elog(ERROR, "RelationBuildTriggers: tgargs IS NULL for rel %s",
- RelationGetRelationName(relation));
if (build->tgnargs > 0)
{
char *p;