1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-17 06:41:09 +03:00

Change elog(WARN) to elog(ERROR) and elog(ABORT).

This commit is contained in:
Bruce Momjian
1998-01-05 03:35:55 +00:00
parent 0af9137f14
commit 0d9fc5afd6
188 changed files with 1436 additions and 1433 deletions

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteDefine.c,v 1.9 1997/12/11 17:36:38 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteDefine.c,v 1.10 1998/01/05 03:32:44 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -98,7 +98,7 @@ InsertRule(char *rulname,
eventrel = heap_openr(evobj);
if (eventrel == NULL)
{
elog(WARN, "rules cannot be defined on relations not in schema");
elog(ABORT, "rules cannot be defined on relations not in schema");
}
eventrel_oid = RelationGetRelationId(eventrel);
@ -118,7 +118,7 @@ InsertRule(char *rulname,
evqual = "nil";
if (IsDefinedRewriteRule(rulname))
elog(WARN, "Attempt to insert rule '%s' failed: already exists",
elog(ABORT, "Attempt to insert rule '%s' failed: already exists",
rulname);
strcpyq(actionbuf, actiontree);
strcpyq(qualbuf, evqual);
@ -130,7 +130,7 @@ InsertRule(char *rulname,
if (strlen(template) + strlen(rulname) + strlen(actionbuf) +
strlen(qualbuf) + 20 /* fudge fac */ > RULE_PLAN_SIZE)
{
elog(WARN, "DefineQueryRewrite: rule plan string too big.");
elog(ABORT, "DefineQueryRewrite: rule plan string too big.");
}
sprintf(rulebuf, template,
rulname, evtype, eventrel_oid, evslot_index, actionbuf,
@ -156,12 +156,12 @@ ValidateRule(int event_type,
if (((event_type == CMD_INSERT) || (event_type == CMD_DELETE)) &&
eslot_string)
{
elog(WARN,
elog(ABORT,
"rules not allowed for insert or delete events to an attribute");
}
if (event_qual && !*action && is_instead)
elog(WARN,
elog(ABORT,
"event_quals on 'instead nothing' rules not currently supported");
#if 0
@ -211,7 +211,7 @@ DefineQueryRewrite(RuleStmt *stmt)
event_relation = heap_openr(event_obj->relname);
if (event_relation == NULL)
{
elog(WARN, "virtual relations not supported yet");
elog(ABORT, "virtual relations not supported yet");
}
ev_relid = RelationGetRelationId(event_relation);
@ -265,7 +265,7 @@ DefineQueryRewrite(RuleStmt *stmt)
/* what is the max size of type text? XXX -- glass */
if (length(action) > 15)
elog(WARN, "max # of actions exceeded");
elog(ABORT, "max # of actions exceeded");
prs2_addToRelation(ev_relid, ruleId, event_type, event_attno,
is_instead, event_qual, action);
}