diff --git a/sql/postgrest.sql b/sql/postgrest.sql index f71ae9e..cb8e5c3 100644 --- a/sql/postgrest.sql +++ b/sql/postgrest.sql @@ -497,7 +497,6 @@ $$ arguments AS ( SELECT p.oid as proc_oid, - p.proname, pa.idx AS idx, COALESCE(pa.name, '') as name, type, @@ -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 @@ -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)