diff --git a/contrib/lo/lo.c b/contrib/lo/lo.c index 4585923ee2..2833dff772 100644 --- a/contrib/lo/lo.c +++ b/contrib/lo/lo.c @@ -33,8 +33,7 @@ lo_manage(PG_FUNCTION_ARGS) HeapTuple trigtuple; /* The original value of tuple */ if (!CALLED_AS_TRIGGER(fcinfo)) /* internal error */ - elog(ERROR, "%s: not fired by trigger manager", - trigdata->tg_trigger->tgname); + elog(ERROR, "lo_manage: not fired by trigger manager"); if (!TRIGGER_FIRED_FOR_ROW(trigdata->tg_event)) /* internal error */ elog(ERROR, "%s: must be fired for row", diff --git a/src/backend/commands/constraint.c b/src/backend/commands/constraint.c index 90f19ad3dd..1ec93c1fd6 100644 --- a/src/backend/commands/constraint.c +++ b/src/backend/commands/constraint.c @@ -37,7 +37,7 @@ Datum unique_key_recheck(PG_FUNCTION_ARGS) { - TriggerData *trigdata = castNode(TriggerData, fcinfo->context); + TriggerData *trigdata = (TriggerData *) fcinfo->context; const char *funcname = "unique_key_recheck"; HeapTuple new_row; ItemPointerData tmptid;