mirror of
https://github.com/lingble/twenty.git
synced 2025-11-02 13:47:55 +00:00
fix: pg_graphql performance (#3204)
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
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()
|
||||
)
|
||||
|
||||
- )
|
||||
+ );
|
||||
Reference in New Issue
Block a user