mirror of
https://github.com/twentyhq/twenty.git
synced 2024-12-14 04:45:06 +03:00
29 lines
1.0 KiB
Diff
29 lines
1.0 KiB
Diff
|
diff --git a/sql/load_sql_context.sql b/sql/load_sql_context.sql
|
||
|
index 565e4e3..40cd99e 100644
|
||
|
--- a/sql/load_sql_context.sql
|
||
|
+++ b/sql/load_sql_context.sql
|
||
|
@@ -95,6 +95,8 @@ select
|
||
|
pg_type pt
|
||
|
left join pg_class tabs
|
||
|
on pt.typrelid = tabs.oid
|
||
|
+ join search_path_oids spo
|
||
|
+ on pt.typnamespace = spo.schema_oid or pt.typnamespace = 'pg_catalog'::regnamespace::oid
|
||
|
),
|
||
|
jsonb_build_object()
|
||
|
),
|
||
|
@@ -111,6 +113,8 @@ select
|
||
|
pg_type pt
|
||
|
join pg_class tabs
|
||
|
on pt.typrelid = tabs.oid
|
||
|
+ join search_path_oids spo
|
||
|
+ on pt.typnamespace = spo.schema_oid or pt.typnamespace = 'pg_catalog'::regnamespace::oid
|
||
|
where
|
||
|
pt.typcategory = 'C'
|
||
|
and tabs.relkind = 'c'
|
||
|
@@ -420,4 +424,4 @@ select
|
||
|
jsonb_build_array()
|
||
|
)
|
||
|
|
||
|
- )
|
||
|
+ );
|