summaryrefslogtreecommitdiff
path: root/src/backend/commands/proclang.c
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2011-11-17 21:31:29 -0500
committerRobert Haas <rhaas@postgresql.org>2011-11-17 21:32:34 -0500
commitfc6d1006bda783cc002c61a5f072905849dbde4b (patch)
tree555ab6461e7780c0f5a5f21cc80b8f7f17eb844d /src/backend/commands/proclang.c
parent709aca59608395eef9ceb7dcb79fd9d03a0709ef (diff)
Further consolidation of DROP statement handling.
This gets rid of an impressive amount of duplicative code, with only minimal behavior changes. DROP FOREIGN DATA WRAPPER now requires object ownership rather than superuser privileges, matching the documentation we already have. We also eliminate the historical warning about dropping a built-in function as unuseful. All operations are now performed in the same order for all object types handled by dropcmds.c. KaiGai Kohei, with minor revisions by me
Diffstat (limited to 'src/backend/commands/proclang.c')
-rw-r--r--src/backend/commands/proclang.c37
1 files changed, 0 insertions, 37 deletions
diff --git a/src/backend/commands/proclang.c b/src/backend/commands/proclang.c
index 7a37e96c402..e4cd2ab33d1 100644
--- a/src/backend/commands/proclang.c
+++ b/src/backend/commands/proclang.c
@@ -507,43 +507,6 @@ PLTemplateExists(const char *languageName)
return (find_language_template(languageName) != NULL);
}
-
-/* ---------------------------------------------------------------------
- * DROP PROCEDURAL LANGUAGE
- * ---------------------------------------------------------------------
- */
-void
-DropProceduralLanguage(DropPLangStmt *stmt)
-{
- Oid oid;
- ObjectAddress object;
-
- oid = get_language_oid(stmt->plname, stmt->missing_ok);
- if (!OidIsValid(oid))
- {
- ereport(NOTICE,
- (errmsg("language \"%s\" does not exist, skipping",
- stmt->plname)));
- return;
- }
-
- /*
- * Check permission
- */
- if (!pg_language_ownercheck(oid, GetUserId()))
- aclcheck_error(ACLCHECK_NOT_OWNER, ACL_KIND_LANGUAGE,
- stmt->plname);
-
- object.classId = LanguageRelationId;
- object.objectId = oid;
- object.objectSubId = 0;
-
- /*
- * Do the deletion
- */
- performDeletion(&object, stmt->behavior);
-}
-
/*
* Guts of language dropping.
*/