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/include/miscadmin.h | |
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/include/miscadmin.h')
-rw-r--r-- | src/include/miscadmin.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/include/miscadmin.h b/src/include/miscadmin.h index 742f58137c5..588c2f99dea 100644 --- a/src/include/miscadmin.h +++ b/src/include/miscadmin.h @@ -12,7 +12,7 @@ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Id: miscadmin.h,v 1.85 2001/05/12 01:48:49 petere Exp $ + * $Id: miscadmin.h,v 1.86 2001/06/13 21:44:41 tgl Exp $ * * NOTES * some of the information in this file should be moved to @@ -220,9 +220,13 @@ extern int CheckPathAccess(char *path, char *name, int open_mode); extern void GetCharSetByHost(char *TableName, int host, const char *DataDir); extern void SetCharSet(void); extern char *convertstr(unsigned char *buff, int len, int dest); - #endif +/* in utils/misc/superuser.c */ +extern bool superuser(void); /* current user is superuser */ +extern bool is_dbadmin(Oid dbid); /* current user is owner of database */ + + /***************************************************************************** * pmod.h -- * * POSTGRES processing mode definitions. * |