diff options
Diffstat (limited to 'contrib/spi/refint.c')
-rw-r--r-- | contrib/spi/refint.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/contrib/spi/refint.c b/contrib/spi/refint.c index cbd08d491db..36f9ee421e7 100644 --- a/contrib/spi/refint.c +++ b/contrib/spi/refint.c @@ -79,9 +79,9 @@ check_primary_key(PG_FUNCTION_ARGS) elog(ERROR, "check_primary_key: not fired by trigger manager"); /* Should be called for ROW trigger */ - if (TRIGGER_FIRED_FOR_STATEMENT(trigdata->tg_event)) + if (!TRIGGER_FIRED_FOR_ROW(trigdata->tg_event)) /* internal error */ - elog(ERROR, "check_primary_key: cannot process STATEMENT events"); + elog(ERROR, "check_primary_key: must be fired for row"); /* If INSERTion then must check Tuple to being inserted */ if (TRIGGER_FIRED_BY_INSERT(trigdata->tg_event)) @@ -279,9 +279,9 @@ check_foreign_key(PG_FUNCTION_ARGS) elog(ERROR, "check_foreign_key: not fired by trigger manager"); /* Should be called for ROW trigger */ - if (TRIGGER_FIRED_FOR_STATEMENT(trigdata->tg_event)) + if (!TRIGGER_FIRED_FOR_ROW(trigdata->tg_event)) /* internal error */ - elog(ERROR, "check_foreign_key: cannot process STATEMENT events"); + elog(ERROR, "check_foreign_key: must be fired for row"); /* Not should be called for INSERT */ if (TRIGGER_FIRED_BY_INSERT(trigdata->tg_event)) |