~vcs-imports/mammoth-replicator/trunk

« back to all changes in this revision

Viewing changes to src/test/regress/input/create_function_1.source

  • Committer: alvherre
  • Date: 2005-12-16 21:24:52 UTC
  • Revision ID: svn-v4:db760fc0-0f08-0410-9d63-cc6633f64896:trunk:1
Initial import of the REL8_0_3 sources from the Pgsql CVS repository.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--
 
2
-- CREATE_FUNCTION_1
 
3
--
 
4
 
 
5
CREATE FUNCTION widget_in(cstring)
 
6
   RETURNS widget
 
7
   AS '@abs_builddir@/regress@DLSUFFIX@'
 
8
   LANGUAGE 'c';
 
9
 
 
10
CREATE FUNCTION widget_out(widget)
 
11
   RETURNS cstring
 
12
   AS '@abs_builddir@/regress@DLSUFFIX@'
 
13
   LANGUAGE 'c';
 
14
 
 
15
CREATE FUNCTION int44in(cstring)
 
16
   RETURNS city_budget
 
17
   AS '@abs_builddir@/regress@DLSUFFIX@'
 
18
   LANGUAGE 'c';
 
19
 
 
20
CREATE FUNCTION int44out(city_budget)
 
21
   RETURNS cstring
 
22
   AS '@abs_builddir@/regress@DLSUFFIX@'
 
23
   LANGUAGE 'c';
 
24
 
 
25
CREATE FUNCTION check_primary_key ()
 
26
        RETURNS trigger
 
27
        AS '@abs_builddir@/../../../contrib/spi/refint@DLSUFFIX@'
 
28
        LANGUAGE 'C';
 
29
 
 
30
CREATE FUNCTION check_foreign_key ()
 
31
        RETURNS trigger
 
32
        AS '@abs_builddir@/../../../contrib/spi/refint@DLSUFFIX@'
 
33
        LANGUAGE 'C';
 
34
 
 
35
CREATE FUNCTION autoinc ()
 
36
        RETURNS trigger
 
37
        AS '@abs_builddir@/../../../contrib/spi/autoinc@DLSUFFIX@'
 
38
        LANGUAGE 'C';
 
39
 
 
40
CREATE FUNCTION funny_dup17 ()
 
41
        RETURNS trigger
 
42
        AS '@abs_builddir@/regress@DLSUFFIX@'
 
43
        LANGUAGE 'C';
 
44
 
 
45
CREATE FUNCTION ttdummy ()
 
46
        RETURNS trigger
 
47
        AS '@abs_builddir@/regress@DLSUFFIX@'
 
48
        LANGUAGE 'C';
 
49
 
 
50
CREATE FUNCTION set_ttdummy (int4)
 
51
        RETURNS int4
 
52
        AS '@abs_builddir@/regress@DLSUFFIX@'
 
53
        LANGUAGE 'C';
 
54
 
 
55
-- Things that shouldn't work:
 
56
 
 
57
CREATE FUNCTION test1 (int) RETURNS int LANGUAGE sql
 
58
    AS 'SELECT ''not an integer'';';
 
59
 
 
60
CREATE FUNCTION test1 (int) RETURNS int LANGUAGE sql
 
61
    AS 'not even SQL';
 
62
 
 
63
CREATE FUNCTION test1 (int) RETURNS int LANGUAGE sql
 
64
    AS 'SELECT 1, 2, 3;';
 
65
 
 
66
CREATE FUNCTION test1 (int) RETURNS int LANGUAGE sql
 
67
    AS 'SELECT $2;';
 
68
 
 
69
CREATE FUNCTION test1 (int) RETURNS int LANGUAGE sql
 
70
    AS 'a', 'b';
 
71
 
 
72
CREATE FUNCTION test1 (int) RETURNS int LANGUAGE c
 
73
    AS 'nosuchfile';
 
74
 
 
75
CREATE FUNCTION test1 (int) RETURNS int LANGUAGE c
 
76
    AS '@abs_builddir@/regress@DLSUFFIX@', 'nosuchsymbol';
 
77
 
 
78
CREATE FUNCTION test1 (int) RETURNS int LANGUAGE internal
 
79
    AS 'nosuch';