1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-16 06:01:02 +03:00

Back out makeNode() patch to fix gcc 3.3.1 warning.

This commit is contained in:
Bruce Momjian
2003-10-13 22:47:15 +00:00
parent 014a0a3da1
commit 4a39057e59
3 changed files with 44 additions and 46 deletions

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/tablecmds.c,v 1.90 2003/10/13 20:02:52 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/commands/tablecmds.c,v 1.91 2003/10/13 22:47:15 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -3397,7 +3397,6 @@ validateForeignKeyConstraint(FkConstraint *fkconstraint,
Relation pkrel)
{
HeapScanDesc scan;
TriggerData *trigdata = makeNode(TriggerData); /* must be Node aligned */
HeapTuple tuple;
Trigger trig;
List *list;
@ -3455,6 +3454,7 @@ validateForeignKeyConstraint(FkConstraint *fkconstraint,
while ((tuple = heap_getnext(scan, ForwardScanDirection)) != NULL)
{
FunctionCallInfoData fcinfo;
TriggerData trigdata;
/*
* Make a call to the trigger function
@ -3466,21 +3466,20 @@ validateForeignKeyConstraint(FkConstraint *fkconstraint,
/*
* We assume RI_FKey_check_ins won't look at flinfo...
*/
trigdata->type = T_TriggerData;
trigdata->tg_event = TRIGGER_EVENT_INSERT | TRIGGER_EVENT_ROW;
trigdata->tg_relation = rel;
trigdata->tg_trigtuple = tuple;
trigdata->tg_newtuple = NULL;
trigdata->tg_trigger = &trig;
trigdata.type = T_TriggerData;
trigdata.tg_event = TRIGGER_EVENT_INSERT | TRIGGER_EVENT_ROW;
trigdata.tg_relation = rel;
trigdata.tg_trigtuple = tuple;
trigdata.tg_newtuple = NULL;
trigdata.tg_trigger = &trig;
fcinfo.context = (Node *) trigdata;
fcinfo.context = (Node *) &trigdata;
RI_FKey_check_ins(&fcinfo);
}
heap_endscan(scan);
pfree(trigdata);
pfree(trig.tgargs);
}