fix: Void functions return null instead of empty body (#1795)

* Change empty body reponse to null for scalar functions returning void or null values

* Add test for functions returning an integer with null value

Co-authored-by: Laurence Isla <lau.isla.c@gmail.com>
This commit is contained in:
laurenceisla
2021-04-08 01:45:13 +02:00
committed by GitHub
co-authored by Laurence Isla
parent 9c79a4174c
commit 7f11c1a991
3 changed files with 15 additions and 4 deletions
+4
View File
@@ -1051,6 +1051,10 @@ $$ language sql;
create function test.ret_void() returns void as '' language sql;
create or replace function test.ret_null() returns int as $$
select null::int;
$$ language sql;
create function test.ret_base64_bin() returns text as $$
select i.img from test.images_base64 i where i.name = 'A.png';
$$ language sql;