From 1a6bb6d877f60c377635c4e83a1b75ca2f437951 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Wed, 13 Jun 2001 21:44:41 +0000 Subject: 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(). --- src/include/miscadmin.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/include/miscadmin.h') 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. * -- cgit v1.2.3