Skip to content

Commit

Permalink
Improve function query performance
Browse files Browse the repository at this point in the history
  • Loading branch information
laurenceisla committed Feb 6, 2024
1 parent f05d2d9 commit 415ebb1
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions sql/postgrest.sql
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,6 @@ $$
arguments AS (
SELECT
p.oid as proc_oid,
p.proname,
pa.idx AS idx,
COALESCE(pa.name, '') as name,
type,
Expand Down Expand Up @@ -538,8 +537,8 @@ $$
t_arr.typrelid AS item_composite_oid,
t_arr.oid AS item_data_type_id,
COALESCE(mode = 'v', FALSE) AS is_variadic
FROM pg_proc p,
unnest(proargnames, proargtypes, proargmodes)
FROM pg_proc p
CROSS JOIN unnest(proargnames, proargtypes, proargmodes)
WITH ORDINALITY AS pa (name, type, mode, idx)
JOIN (pg_type t JOIN pg_namespace nt ON t.typnamespace = nt.oid)
ON pa.type = t.oid
Expand Down Expand Up @@ -631,7 +630,6 @@ $$
LEFT JOIN LATERAL unnest(proconfig) timeout_config ON timeout_config like 'statement_timeout%'
WHERE t.oid <> 'trigger'::regtype AND COALESCE(a.callable, true)
AND prokind = 'f'
AND pn.nspname = ANY(schemas)
$$;

create or replace function postgrest_get_schema_description(schema text)
Expand Down

0 comments on commit 415ebb1

Please sign in to comment.