diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2001-06-13 21:44:41 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2001-06-13 21:44:41 +0000 |
commit | 1a6bb6d877f60c377635c4e83a1b75ca2f437951 (patch) | |
tree | 842ea6e49fcfda307f33a325356a24c27c5cda33 /src/backend/commands/proclang.c | |
parent | f21e3407e6f8b706dc2a490365e13a8e613523de (diff) | |
download | postgresql-1a6bb6d877f60c377635c4e83a1b75ca2f437951.tar.gz postgresql-1a6bb6d877f60c377635c4e83a1b75ca2f437951.zip |
Allow a non-superuser database owner to vacuum all tables in his
database, including system catalogs (but not the shared catalogs,
since they don't really belong to his database). This is per recent
mailing list discussion. Clean up some other code that also checks
for database ownerness by introducing a test function is_dbadmin().
Diffstat (limited to 'src/backend/commands/proclang.c')
-rw-r--r-- | src/backend/commands/proclang.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/backend/commands/proclang.c b/src/backend/commands/proclang.c index 43327c7a65a..120c5d8b008 100644 --- a/src/backend/commands/proclang.c +++ b/src/backend/commands/proclang.c @@ -3,20 +3,26 @@ * proclang.c * PostgreSQL PROCEDURAL LANGUAGE support code. * + * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group + * Portions Copyright (c) 1994, Regents of the University of California + * + * IDENTIFICATION + * $Header: /cvsroot/pgsql/src/backend/commands/proclang.c,v 1.28 2001/06/13 21:44:40 tgl Exp $ + * *------------------------------------------------------------------------- */ -#include <ctype.h> - #include "postgres.h" +#include <ctype.h> + #include "access/heapam.h" #include "catalog/catname.h" #include "catalog/indexing.h" #include "catalog/pg_language.h" #include "catalog/pg_proc.h" -#include "catalog/pg_shadow.h" #include "commands/proclang.h" #include "fmgr.h" +#include "miscadmin.h" #include "utils/builtins.h" #include "utils/syscache.h" @@ -63,10 +69,8 @@ CreateProceduralLanguage(CreatePLangStmt *stmt) * Check permission */ if (!superuser()) - { elog(ERROR, "Only users with Postgres superuser privilege are " "permitted to create procedural languages"); - } /* * Translate the language name and check that this language doesn't @@ -150,10 +154,8 @@ DropProceduralLanguage(DropPLangStmt *stmt) * Check permission */ if (!superuser()) - { elog(ERROR, "Only users with Postgres superuser privilege are " "permitted to drop procedural languages"); - } /* * Translate the language name, check that this language exist and is |