Add test for a proc name = return col name, Fix #901
This commit is contained in:
@@ -667,6 +667,10 @@ spec = do
|
|||||||
[json| "Return value of no parameters procedure." |]
|
[json| "Return value of no parameters procedure." |]
|
||||||
{ matchHeaders = [matchContentTypeJson] }
|
{ matchHeaders = [matchContentTypeJson] }
|
||||||
|
|
||||||
|
it "returns proper output when having the same return col name as the proc name" $
|
||||||
|
post "/rpc/test" [json|{}|] `shouldRespondWith`
|
||||||
|
[json|[{"test":"hello","value":1}]|] { matchHeaders = [matchContentTypeJson] }
|
||||||
|
|
||||||
describe "weird requests" $ do
|
describe "weird requests" $ do
|
||||||
it "can query as normal" $ do
|
it "can query as normal" $ do
|
||||||
get "/Escap3e;" `shouldRespondWith`
|
get "/Escap3e;" `shouldRespondWith`
|
||||||
|
|||||||
Vendored
+6
@@ -1215,6 +1215,12 @@ create table grandchild_entities (
|
|||||||
jsonb_col jsonb
|
jsonb_col jsonb
|
||||||
);
|
);
|
||||||
|
|
||||||
|
-- Used for testing that having the same return column name as the proc name
|
||||||
|
-- doesn't conflict with the required output, details in #901
|
||||||
|
create function test.test() returns table(test text, value int) as $$
|
||||||
|
values ('hello', 1);
|
||||||
|
$$ language sql;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- PostgreSQL database dump complete
|
-- PostgreSQL database dump complete
|
||||||
--
|
--
|
||||||
|
|||||||
Reference in New Issue
Block a user