summaryrefslogtreecommitdiff
path: root/src/test/regress/output/create_function_2.source
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2001-06-04 23:27:23 +0000
committerBruce Momjian <bruce@momjian.us>2001-06-04 23:27:23 +0000
commit28d2420eefdacfa928138d4b302fd6a31286225b (patch)
tree73df5116c5775c04e5e0fbc628e38611d6dd6851 /src/test/regress/output/create_function_2.source
parent0a93285d88136df76b88247c5b5ddf3d4b418be4 (diff)
downloadpostgresql-28d2420eefdacfa928138d4b302fd6a31286225b.tar.gz
This patch adds support for %TYPE in CREATE FUNCTION argument and return
types. This version has an elog() to remind the user the type resolution is not dynamic. Ian Lance Taylor
Diffstat (limited to 'src/test/regress/output/create_function_2.source')
-rw-r--r--src/test/regress/output/create_function_2.source6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/test/regress/output/create_function_2.source b/src/test/regress/output/create_function_2.source
index a5f39a00bb..137242da70 100644
--- a/src/test/regress/output/create_function_2.source
+++ b/src/test/regress/output/create_function_2.source
@@ -9,6 +9,12 @@ CREATE FUNCTION hobby_construct(text, text)
RETURNS hobbies_r
AS 'select $1 as name, $2 as hobby'
LANGUAGE 'sql';
+CREATE FUNCTION hobbies_by_name(hobbies_r.name%TYPE)
+ RETURNS hobbies_r.person%TYPE
+ AS 'select person from hobbies_r where name = $1'
+ LANGUAGE 'sql';
+NOTICE: hobbies_r.name%TYPE converted to text
+NOTICE: hobbies_r.person%TYPE converted to text
CREATE FUNCTION equipment(hobbies_r)
RETURNS setof equipment_r
AS 'select * from equipment_r where hobby = $1.name'