You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reqLogger.Error(err, fmt.Sprintf("Could not give %s permissions \"%s\"", writer, writerPrivs))
236
+
reqLogger.Error(err, fmt.Sprintf("Could not give %s permissions \"%s\", sequence privileges \"%s\", and function privileges \"%s\"", writer, writerPrivs, writerSequencePrivs, writerFunctionPrivs))
reqLogger.Error(err, fmt.Sprintf("Could not give %s permissions \"%s\"", writer, writerPrivs))
250
+
reqLogger.Error(err, fmt.Sprintf("Could not give %s permissions \"%s\", sequence privileges \"%s\", and function privileges \"%s\"", owner, ownerPrivs, ownerSequencePrivs, ownerFunctionPrivs))
Copy file name to clipboardExpand all lines: pkg/postgres/database.go
+45-13Lines changed: 45 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -8,19 +8,23 @@ import (
8
8
)
9
9
10
10
const (
11
-
CREATE_DB=`CREATE DATABASE "%s"`
12
-
CREATE_SCHEMA=`CREATE SCHEMA IF NOT EXISTS "%s" AUTHORIZATION "%s"`
13
-
CREATE_EXTENSION=`CREATE EXTENSION IF NOT EXISTS "%s"`
14
-
ALTER_DB_OWNER=`ALTER DATABASE "%s" OWNER TO "%s"`
15
-
DROP_DATABASE=`DROP DATABASE "%s"`
16
-
GRANT_USAGE_SCHEMA=`GRANT USAGE ON SCHEMA "%s" TO "%s"`
17
-
GRANT_CREATE_TABLE=`GRANT CREATE ON SCHEMA "%s" TO "%s"`
18
-
GRANT_ALL_TABLES=`GRANT %s ON ALL TABLES IN SCHEMA "%s" TO "%s"`
19
-
DEFAULT_PRIVS_SCHEMA=`ALTER DEFAULT PRIVILEGES IN SCHEMA "%s" GRANT %s ON TABLES TO "%s"`
20
-
REVOKE_CONNECT=`REVOKE CONNECT ON DATABASE "%s" FROM public`
21
-
TERMINATE_BACKEND=`SELECT pg_terminate_backend(pg_stat_activity.pid) FROM pg_stat_activity WHERE pg_stat_activity.datname = '%s' AND pid <> pg_backend_pid()`
22
-
GET_DB_OWNER=`SELECT pg_catalog.pg_get_userbyid(d.datdba) FROM pg_catalog.pg_database d WHERE d.datname = '%s'`
23
-
GRANT_CREATE_SCHEMA=`GRANT CREATE ON DATABASE "%s" TO "%s"`
11
+
CREATE_DB=`CREATE DATABASE "%s"`
12
+
CREATE_SCHEMA=`CREATE SCHEMA IF NOT EXISTS "%s" AUTHORIZATION "%s"`
13
+
CREATE_EXTENSION=`CREATE EXTENSION IF NOT EXISTS "%s"`
14
+
ALTER_DB_OWNER=`ALTER DATABASE "%s" OWNER TO "%s"`
15
+
DROP_DATABASE=`DROP DATABASE "%s"`
16
+
GRANT_USAGE_SCHEMA=`GRANT USAGE ON SCHEMA "%s" TO "%s"`
17
+
GRANT_CREATE_TABLE=`GRANT CREATE ON SCHEMA "%s" TO "%s"`
18
+
GRANT_ALL_TABLES=`GRANT %s ON ALL TABLES IN SCHEMA "%s" TO "%s"`
19
+
DEFAULT_PRIVS_SCHEMA=`ALTER DEFAULT PRIVILEGES IN SCHEMA "%s" GRANT %s ON TABLES TO "%s"`
20
+
GRANT_ALL_FUNCTIONS=`GRANT %s ON ALL FUNCTIONS IN SCHEMA "%s" TO "%s"`
21
+
DEFAULT_PRIVS_FUNCTIONS=`ALTER DEFAULT PRIVILEGES IN SCHEMA "%s" GRANT %s ON FUNCTIONS TO "%s"`
22
+
GRANT_ALL_SEQUENCES=`GRANT %s ON ALL SEQUENCES IN SCHEMA "%s" TO "%s"`
23
+
DEFAULT_PRIVS_SEQUENCES=`ALTER DEFAULT PRIVILEGES IN SCHEMA "%s" GRANT %s ON SEQUENCES TO "%s"`
24
+
REVOKE_CONNECT=`REVOKE CONNECT ON DATABASE "%s" FROM public`
25
+
TERMINATE_BACKEND=`SELECT pg_terminate_backend(pg_stat_activity.pid) FROM pg_stat_activity WHERE pg_stat_activity.datname = '%s' AND pid <> pg_backend_pid()`
26
+
GET_DB_OWNER=`SELECT pg_catalog.pg_get_userbyid(d.datdba) FROM pg_catalog.pg_database d WHERE d.datname = '%s'`
27
+
GRANT_CREATE_SCHEMA=`GRANT CREATE ON DATABASE "%s" TO "%s"`
0 commit comments