File tree Expand file tree Collapse file tree 2 files changed +11
-15
lines changed Expand file tree Collapse file tree 2 files changed +11
-15
lines changed Original file line number Diff line number Diff line change 1
- export const DEFAULT_SYSTEM_SCHEMAS = [
2
- 'information_schema' ,
3
- 'pg_catalog' ,
4
- 'pg_temp_1' ,
5
- 'pg_toast' ,
6
- 'pg_toast_temp_1' ,
7
- ]
1
+ export const DEFAULT_SYSTEM_SCHEMAS = [ 'information_schema' , 'pg_catalog' , 'pg_toast' ]
Original file line number Diff line number Diff line change 1
1
-- Adapted from information_schema.schemata
2
2
3
- SELECT
4
- n .oid :: int8 AS id,
5
- n .nspname AS name,
6
- u .rolname AS owner
7
- FROM
3
+ select
4
+ n .oid :: int8 as id,
5
+ n .nspname as name,
6
+ u .rolname as owner
7
+ from
8
8
pg_namespace n,
9
9
pg_roles u
10
- WHERE
10
+ where
11
11
n .nspowner = u .oid
12
- AND (
12
+ and (
13
13
pg_has_role(n .nspowner , ' USAGE' )
14
- OR has_schema_privilege(n .oid , ' CREATE, USAGE' )
14
+ or has_schema_privilege(n .oid , ' CREATE, USAGE' )
15
15
)
16
+ and not pg_catalog .starts_with (n .nspname , ' pg_temp_' )
17
+ and not pg_catalog .starts_with (n .nspname , ' pg_toast_temp_' )
You can’t perform that action at this time.
0 commit comments