fix: fix output of RPCs returning scalar values with multiple rows
resolves #1584 BREAKING CHANGE: Changed output of RPCs to match return type better: * single scalar return: value (unchanged) * setof scalar return: array of values (new; was array of objects) * single composite return: object (new; was array of objects) * setof composite return: array of objects (unchanged) * void return: nothing (new; was "null") A single OUT column is now treated as "composite" instead of "scalar", i.e. consistent with multiple OUT columns.
This commit is contained in:
committed by
Wolfgang Walther
parent
093fd3c8f6
commit
0c25f12825
Vendored
+6
@@ -1636,6 +1636,12 @@ create or replace function welcome() returns text as $$
|
||||
select 'Welcome to PostgREST'::text;
|
||||
$$ language sql;
|
||||
|
||||
create or replace function welcome_twice() returns setof text as $$
|
||||
select 'Welcome to PostgREST'
|
||||
union all
|
||||
select 'Welcome to PostgREST';
|
||||
$$ language sql;
|
||||
|
||||
create or replace function "welcome.html"() returns text as $_$
|
||||
select $$
|
||||
<html>
|
||||
|
||||
Reference in New Issue
Block a user