Skip to content

Commit cf204b9

Browse files
authored
postgresql_grant: Remove TEMP privilege for database (cyrilgdn#243)
It's an alternative spelling for TEMPORARY. In pg_database, only TEMPORARY is saved so let's remove TEMP to keep the code simple and not having to manage this specific use case
1 parent e039204 commit cf204b9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

postgresql/helpers.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ func sliceContainsStr(haystack []string, needle string) bool {
235235
// allowedPrivileges is the list of privileges allowed per object types in Postgres.
236236
// see: https://www.postgresql.org/docs/current/sql-grant.html
237237
var allowedPrivileges = map[string][]string{
238-
"database": {"ALL", "CREATE", "CONNECT", "TEMPORARY", "TEMP"},
238+
"database": {"ALL", "CREATE", "CONNECT", "TEMPORARY"},
239239
"table": {"ALL", "SELECT", "INSERT", "UPDATE", "DELETE", "TRUNCATE", "REFERENCES", "TRIGGER"},
240240
"sequence": {"ALL", "USAGE", "SELECT", "UPDATE"},
241241
"schema": {"ALL", "CREATE", "USAGE"},

0 commit comments

Comments
 (0)