summaryrefslogtreecommitdiff
path: root/src/backend/commands/opclasscmds.c
diff options
context:
space:
mode:
authorRobert Haas2011-10-21 13:10:46 +0000
committerRobert Haas2011-10-21 13:12:23 +0000
commit980261929f2b8c40d6be1979ff81c943cad907b3 (patch)
treeebc0af260055c510211b988899984eea01b5e920 /src/backend/commands/opclasscmds.c
parentb4a0223d008d7c2c9824d846e22b664b2f09cf6e (diff)
Fix DROP OPERATOR FAMILY IF EXISTS.
Essentially, the "IF EXISTS" portion was being ignored, and an error thrown anyway if the opfamily did not exist. I broke this in commit fd1843ff8979c0461fb3f1a9eab61140c977e32d; so backpatch to 9.1.X. Report and diagnosis by KaiGai Kohei.
Diffstat (limited to 'src/backend/commands/opclasscmds.c')
-rw-r--r--src/backend/commands/opclasscmds.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/backend/commands/opclasscmds.c b/src/backend/commands/opclasscmds.c
index 5dde78abc9a..af0de05a032 100644
--- a/src/backend/commands/opclasscmds.c
+++ b/src/backend/commands/opclasscmds.c
@@ -1613,10 +1613,9 @@ RemoveOpFamily(RemoveOpFamilyStmt *stmt)
tuple = OpFamilyCacheLookup(amID, stmt->opfamilyname, stmt->missing_ok);
if (!HeapTupleIsValid(tuple))
{
- ereport(ERROR,
- (errcode(ERRCODE_UNDEFINED_OBJECT),
- errmsg("operator family \"%s\" does not exist for access method \"%s\"",
- NameListToString(stmt->opfamilyname), stmt->amname)));
+ ereport(NOTICE,
+ (errmsg("operator family \"%s\" does not exist for access method \"%s\", skipping",
+ NameListToString(stmt->opfamilyname), stmt->amname)));
return;
}