diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2005-06-28 19:51:26 +0000 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2005-06-28 19:51:26 +0000 |
| commit | 0eaa36a16a89029f1b2eb9a38c90e3a0a0e2641e (patch) | |
| tree | 31ad7be7a83a1fa7186e8de04c317f011ef4f54e /src/backend/parser/keywords.c | |
| parent | 88b49cdc95ef9601edcb2cdb3fbe1986128b5092 (diff) | |
| download | postgresql-0eaa36a16a89029f1b2eb9a38c90e3a0a0e2641e.tar.gz | |
Bring syntax of role-related commands into SQL compliance. To avoid
syntactic conflicts, both privilege and role GRANT/REVOKE commands have
to use the same production for scanning the list of tokens that might
eventually turn out to be privileges or role names. So, change the
existing GRANT/REVOKE code to expect a list of strings not pre-reduced
AclMode values. Fix a couple other minor issues while at it, such as
InitializeAcl function name conflicting with a Windows system function.
Diffstat (limited to 'src/backend/parser/keywords.c')
| -rw-r--r-- | src/backend/parser/keywords.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/backend/parser/keywords.c b/src/backend/parser/keywords.c index a11d4affc1..6fcb97675f 100644 --- a/src/backend/parser/keywords.c +++ b/src/backend/parser/keywords.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/parser/keywords.c,v 1.160 2005/06/28 05:08:58 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/parser/keywords.c,v 1.161 2005/06/28 19:51:22 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -35,6 +35,7 @@ static const ScanKeyword ScanKeywords[] = { {"access", ACCESS}, {"action", ACTION}, {"add", ADD}, + {"admin", ADMIN}, {"after", AFTER}, {"aggregate", AGGREGATE}, {"all", ALL}, @@ -89,10 +90,12 @@ static const ScanKeyword ScanKeywords[] = { {"copy", COPY}, {"create", CREATE}, {"createdb", CREATEDB}, + {"createrole", CREATEROLE}, {"createuser", CREATEUSER}, {"cross", CROSS}, {"csv", CSV}, {"current_date", CURRENT_DATE}, + {"current_role", CURRENT_ROLE}, {"current_time", CURRENT_TIME}, {"current_timestamp", CURRENT_TIMESTAMP}, {"current_user", CURRENT_USER}, @@ -146,6 +149,7 @@ static const ScanKeyword ScanKeywords[] = { {"function", FUNCTION}, {"global", GLOBAL}, {"grant", GRANT}, + {"granted", GRANTED}, {"greatest", GREATEST}, {"group", GROUP_P}, {"handler", HANDLER}, @@ -197,6 +201,7 @@ static const ScanKeyword ScanKeywords[] = { {"localtimestamp", LOCALTIMESTAMP}, {"location", LOCATION}, {"lock", LOCK_P}, + {"login", LOGIN_P}, {"match", MATCH}, {"maxvalue", MAXVALUE}, {"minute", MINUTE_P}, @@ -212,7 +217,9 @@ static const ScanKeyword ScanKeywords[] = { {"next", NEXT}, {"no", NO}, {"nocreatedb", NOCREATEDB}, + {"nocreaterole", NOCREATEROLE}, {"nocreateuser", NOCREATEUSER}, + {"nologin", NOLOGIN_P}, {"none", NONE}, {"not", NOT}, {"nothing", NOTHING}, @@ -331,7 +338,6 @@ static const ScanKeyword ScanKeywords[] = { {"unlisten", UNLISTEN}, {"until", UNTIL}, {"update", UPDATE}, - {"usage", USAGE}, {"user", USER}, {"using", USING}, {"vacuum", VACUUM}, |
