1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-12 05:01:15 +03:00

Back out pg_shadow changes to allow create table and locking permissions.

This commit is contained in:
Bruce Momjian
2000-06-12 03:41:03 +00:00
parent 64948dbe15
commit 3357e1d29e
13 changed files with 53 additions and 225 deletions

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/tcop/pquery.c,v 1.33 2000/06/09 15:50:46 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/tcop/pquery.c,v 1.34 2000/06/12 03:40:40 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -20,9 +20,6 @@
#include "executor/executor.h"
#include "tcop/pquery.h"
#include "utils/ps_status.h"
#include "catalog/pg_shadow.h"
#include "miscadmin.h"
#include "utils/syscache.h"
static char *CreateOperationTag(int operationType);
static void ProcessQueryDesc(QueryDesc *queryDesc, Node *limoffset,
@@ -253,23 +250,6 @@ ProcessQueryDesc(QueryDesc *queryDesc, Node *limoffset, Node *limcount)
else if (parseTree->into != NULL)
{
/* select into table */
if (!parseTree->isTemp) {
HeapTuple tup;
/* ----------
* Check pg_shadow for global createTable setting
* ----------
*/
tup = SearchSysCacheTuple(SHADOWNAME, PointerGetDatum(GetPgUserName()), 0, 0, 0);
if (!HeapTupleIsValid(tup))
elog(ERROR, "ProcessQueryDesc: look at pg_shadow failed");
if (!((Form_pg_shadow) GETSTRUCT(tup))->usecreatetable)
elog(ERROR, "SELECT INTO TABLE: permission denied");
}
isRetrieveIntoRelation = true;
}