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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user