fix: Return array of objects for RPCs with single-column TABLE return type

This is a regression after changing responses for RPCs with INOUT or OUT arguments in #1615.

Resolves #1930.
This commit is contained in:
Wolfgang Walther
2021-09-02 10:13:03 -05:00
committed by Steve Chavez
parent d4c6abbaec
commit b05898d17f
4 changed files with 23 additions and 4 deletions
+2 -4
View File
@@ -284,10 +284,8 @@ procsSqlQuery = [q|
COALESCE(comp.relname, t.typname) AS name,
p.proretset AS rettype_is_setof,
(t.typtype = 'c'
-- Only pg pseudo type that is a row type is 'record'
or t.typtype = 'p' and t.typname = 'record'
-- if any INOUT or OUT arguments present, treat as composite
or COALESCE(proargmodes::text[] && '{b,o}', false)
-- if any TABLE, INOUT or OUT arguments present, treat as composite
or COALESCE(proargmodes::text[] && '{t,b,o}', false)
) AS rettype_is_composite,
p.provolatile,
p.provariadic > 0 as hasvariadic