mirror of
https://github.com/postgres/postgres.git
synced 2025-11-09 06:21:09 +03:00
I have large database and with this DB work more users and I very need
more restriction for fretful users. The current PG allow define only
NO-CREATE-DB and NO-CREATE-USER restriction, but for some users I need
NO-CREATE-TABLE and NO-LOCK-TABLE.
This patch add to current code NOCREATETABLE and NOLOCKTABLE feature:
CREATE USER username
[ WITH
[ SYSID uid ]
[ PASSWORD 'password' ] ]
[ CREATEDB | NOCREATEDB ] [ CREATEUSER | NOCREATEUSER ]
-> [ CREATETABLE | NOCREATETABLE ] [ LOCKTABLE | NOLOCKTABLE ]
...etc.
If CREATETABLE or LOCKTABLE is not specific in CREATE USER command,
as default is set CREATETABLE or LOCKTABLE (true).
A user with NOCREATETABLE restriction can't call CREATE TABLE or
SELECT INTO commands, only create temp table is allow for him.
Karel
This commit is contained in:
@@ -9,9 +9,9 @@
|
||||
*
|
||||
* IDENTIFICATION
|
||||
<<<<<<< keywords.c
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/keywords.c,v 1.74 2000/06/09 01:44:18 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/keywords.c,v 1.75 2000/06/09 15:50:45 momjian Exp $
|
||||
=======
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/keywords.c,v 1.74 2000/06/09 01:44:18 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/keywords.c,v 1.75 2000/06/09 15:50:45 momjian Exp $
|
||||
>>>>>>> 1.73
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
@@ -75,6 +75,7 @@ static ScanKeyword ScanKeywords[] = {
|
||||
{"copy", COPY},
|
||||
{"create", CREATE},
|
||||
{"createdb", CREATEDB},
|
||||
{"createtable", CREATETABLE},
|
||||
{"createuser", CREATEUSER},
|
||||
{"cross", CROSS},
|
||||
{"current_date", CURRENT_DATE},
|
||||
@@ -155,6 +156,7 @@ static ScanKeyword ScanKeywords[] = {
|
||||
{"local", LOCAL},
|
||||
{"location", LOCATION},
|
||||
{"lock", LOCK_P},
|
||||
{"locktable", LOCKTABLE},
|
||||
{"match", MATCH},
|
||||
{"maxvalue", MAXVALUE},
|
||||
{"minute", MINUTE_P},
|
||||
@@ -170,7 +172,9 @@ static ScanKeyword ScanKeywords[] = {
|
||||
{"next", NEXT},
|
||||
{"no", NO},
|
||||
{"nocreatedb", NOCREATEDB},
|
||||
{"nocreatetable", NOCREATETABLE},
|
||||
{"nocreateuser", NOCREATEUSER},
|
||||
{"nolocktable", NOLOCKTABLE},
|
||||
{"none", NONE},
|
||||
{"not", NOT},
|
||||
{"nothing", NOTHING},
|
||||
|
||||
Reference in New Issue
Block a user