From 6348b5ccd8cebf44dea0c9668b131647354d614e Mon Sep 17 00:00:00 2001 From: Marko Kreen Date: Wed, 2 Feb 2011 14:41:32 +0200 Subject: [PATCH] test argument type quoting --- expected/plproxy_test.out | 17 +++++++++++++++++ sql/plproxy_test.sql | 13 +++++++++++++ 2 files changed, 30 insertions(+) diff --git a/expected/plproxy_test.out b/expected/plproxy_test.out index 9500283..b3c2929 100644 --- a/expected/plproxy_test.out +++ b/expected/plproxy_test.out @@ -289,6 +289,23 @@ select * from "testQuoting"('user', '1', 'dat'); 1 | BazOoka (1 row) +-- test arg type quoting +create domain "bad type" as text; +create function test_argq(username text, "some arg" integer, "other arg" "bad type", + out "bad out" text, out "bad out2" "bad type") +as $$ cluster 'testcluster'; run on hashtext(username); $$ language plproxy; +\c test_part +create domain "bad type" as text; +create function test_argq(username text, "some arg" integer, "other arg" "bad type", + out "bad out" text, out "bad out2" "bad type") + as $$ begin return; end; $$ language plpgsql; +\c regression +select * from test_argq('user', 1, 'q'); + bad out | bad out2 +---------+---------- + | +(1 row) + -- test hash types function create or replace function t_hash16(int4) returns int2 as $$ declare diff --git a/sql/plproxy_test.sql b/sql/plproxy_test.sql index d2f725c..7eac7bc 100644 --- a/sql/plproxy_test.sql +++ b/sql/plproxy_test.sql @@ -175,6 +175,19 @@ returns "RetWeird" as $$ select 1::int4, 'BazOoka'::text $$ language sql; \c regression select * from "testQuoting"('user', '1', 'dat'); +-- test arg type quoting +create domain "bad type" as text; +create function test_argq(username text, "some arg" integer, "other arg" "bad type", + out "bad out" text, out "bad out2" "bad type") +as $$ cluster 'testcluster'; run on hashtext(username); $$ language plproxy; +\c test_part +create domain "bad type" as text; +create function test_argq(username text, "some arg" integer, "other arg" "bad type", + out "bad out" text, out "bad out2" "bad type") + as $$ begin return; end; $$ language plpgsql; +\c regression +select * from test_argq('user', 1, 'q'); + -- test hash types function create or replace function t_hash16(int4) returns int2 as $$ declare -- 2.39.5