1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-14 08:21:07 +03:00

Error message editing in backend/optimizer, backend/rewrite.

This commit is contained in:
Tom Lane
2003-07-25 00:01:09 +00:00
parent cfa191f3b8
commit 45708f5ebc
29 changed files with 325 additions and 246 deletions

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteRemove.c,v 1.53 2002/09/04 20:31:25 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteRemove.c,v 1.54 2003/07/25 00:01:09 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -54,7 +54,10 @@ RemoveRewriteRule(Oid owningRel, const char *ruleName, DropBehavior behavior)
* complain if no rule with such name exists
*/
if (!HeapTupleIsValid(tuple))
elog(ERROR, "Rule \"%s\" not found", ruleName);
ereport(ERROR,
(errcode(ERRCODE_UNDEFINED_OBJECT),
errmsg("rule \"%s\" for relation \"%s\" does not exist",
ruleName, get_rel_name(owningRel))));
/*
* Verify user has appropriate permissions.
@ -110,8 +113,7 @@ RemoveRewriteRuleById(Oid ruleOid)
tuple = systable_getnext(rcscan);
if (!HeapTupleIsValid(tuple))
elog(ERROR, "RemoveRewriteRuleById: Rule %u does not exist",
ruleOid);
elog(ERROR, "could not find tuple for rule %u", ruleOid);
/*
* We had better grab AccessExclusiveLock so that we know no other