4
CREATE FUNCTION widget_in(cstring)
6
AS '@abs_builddir@/regress@DLSUFFIX@'
8
NOTICE: type "widget" is not yet defined
9
DETAIL: Creating a shell type definition.
10
CREATE FUNCTION widget_out(widget)
12
AS '@abs_builddir@/regress@DLSUFFIX@'
14
NOTICE: argument type widget is only a shell
15
CREATE FUNCTION int44in(cstring)
17
AS '@abs_builddir@/regress@DLSUFFIX@'
19
NOTICE: type "city_budget" is not yet defined
20
DETAIL: Creating a shell type definition.
21
CREATE FUNCTION int44out(city_budget)
23
AS '@abs_builddir@/regress@DLSUFFIX@'
25
NOTICE: argument type city_budget is only a shell
26
CREATE FUNCTION check_primary_key ()
28
AS '@abs_builddir@/../../../contrib/spi/refint@DLSUFFIX@'
30
CREATE FUNCTION check_foreign_key ()
32
AS '@abs_builddir@/../../../contrib/spi/refint@DLSUFFIX@'
34
CREATE FUNCTION autoinc ()
36
AS '@abs_builddir@/../../../contrib/spi/autoinc@DLSUFFIX@'
38
CREATE FUNCTION funny_dup17 ()
40
AS '@abs_builddir@/regress@DLSUFFIX@'
42
CREATE FUNCTION ttdummy ()
44
AS '@abs_builddir@/regress@DLSUFFIX@'
46
CREATE FUNCTION set_ttdummy (int4)
48
AS '@abs_builddir@/regress@DLSUFFIX@'
50
-- Things that shouldn't work:
51
CREATE FUNCTION test1 (int) RETURNS int LANGUAGE sql
52
AS 'SELECT ''not an integer'';';
53
ERROR: return type mismatch in function declared to return integer
54
DETAIL: Actual return type is "unknown".
55
CONTEXT: SQL function "test1"
56
CREATE FUNCTION test1 (int) RETURNS int LANGUAGE sql
58
ERROR: syntax error at or near "not" at character 62
59
LINE 2: AS 'not even SQL';
61
CREATE FUNCTION test1 (int) RETURNS int LANGUAGE sql
63
ERROR: return type mismatch in function declared to return integer
64
DETAIL: Final SELECT must return exactly one column.
65
CONTEXT: SQL function "test1"
66
CREATE FUNCTION test1 (int) RETURNS int LANGUAGE sql
68
ERROR: there is no parameter $2
69
CONTEXT: SQL function "test1"
70
CREATE FUNCTION test1 (int) RETURNS int LANGUAGE sql
72
ERROR: only one AS item needed for language "sql"
73
CREATE FUNCTION test1 (int) RETURNS int LANGUAGE c
75
ERROR: could not access file "nosuchfile": No such file or directory
76
CREATE FUNCTION test1 (int) RETURNS int LANGUAGE c
77
AS '@abs_builddir@/regress@DLSUFFIX@', 'nosuchsymbol';
78
ERROR: could not find function "nosuchsymbol" in file "@abs_builddir@/regress@DLSUFFIX@"
79
CREATE FUNCTION test1 (int) RETURNS int LANGUAGE internal
81
ERROR: there is no built-in function named "nosuch"