Project

General

Profile

1 2094 aaronmk
--
2
-- PostgreSQL database dump
3
--
4
5
SET statement_timeout = 0;
6
SET client_encoding = 'UTF8';
7
SET standard_conforming_strings = off;
8
SET check_function_bodies = false;
9
SET client_min_messages = warning;
10
SET escape_string_warning = off;
11
12
--
13
-- Name: functions; Type: SCHEMA; Schema: -; Owner: -
14
--
15
16
CREATE SCHEMA functions;
17
18
19 2107 aaronmk
SET search_path = functions, pg_catalog;
20
21 2094 aaronmk
--
22 2107 aaronmk
-- Name: _toDouble(); Type: FUNCTION; Schema: functions; Owner: -
23
--
24
25
CREATE FUNCTION "_toDouble"() RETURNS trigger
26 2135 aaronmk
    LANGUAGE plpgsql IMMUTABLE
27 2107 aaronmk
    AS $$
28
BEGIN
29
    new.result := CAST(new.value AS double precision);
30
    RETURN new;
31
END;
32
$$;
33
34
35
SET default_tablespace = '';
36
37
SET default_with_oids = false;
38
39
--
40
-- Name: _toDouble; Type: TABLE; Schema: functions; Owner: -; Tablespace:
41
--
42
43
CREATE TABLE "_toDouble" (
44
    result double precision,
45
    value text
46
);
47
48
49
--
50
-- Name: _toDouble_unique; Type: INDEX; Schema: functions; Owner: -; Tablespace:
51
--
52
53
CREATE UNIQUE INDEX "_toDouble_unique" ON "_toDouble" USING btree ((COALESCE(value, '\\N'::text)));
54
55
56
--
57
-- Name: _toDouble; Type: TRIGGER; Schema: functions; Owner: -
58
--
59
60
CREATE TRIGGER "_toDouble" BEFORE INSERT OR UPDATE ON "_toDouble" FOR EACH ROW EXECUTE PROCEDURE "_toDouble"();
61
62
63
--
64 2094 aaronmk
-- PostgreSQL database dump complete
65
--
66
67 2136 aaronmk
68
--
69
-- Name: _toBool(); Type: FUNCTION; Schema: functions; Owner: -
70
--
71
72
CREATE FUNCTION "_toBool"() RETURNS trigger
73
    LANGUAGE plpgsql IMMUTABLE
74
    AS $$
75
BEGIN
76
    new.result := CAST(new.value AS boolean);
77
    RETURN new;
78
END;
79
$$;
80
81
82
SET default_tablespace = '';
83
84
SET default_with_oids = false;
85
86
--
87
-- Name: _toBool; Type: TABLE; Schema: functions; Owner: -; Tablespace:
88
--
89
90
CREATE TABLE "_toBool" (
91
    result boolean,
92
    value text
93
);
94
95
96
--
97
-- Name: _toBool_unique; Type: INDEX; Schema: functions; Owner: -; Tablespace:
98
--
99
100
CREATE UNIQUE INDEX "_toBool_unique" ON "_toBool" USING btree ((COALESCE(value, '\\N'::text)));
101
102
103
--
104
-- Name: _toBool; Type: TRIGGER; Schema: functions; Owner: -
105
--
106
107
CREATE TRIGGER "_toBool" BEFORE INSERT OR UPDATE ON "_toBool" FOR EACH ROW EXECUTE PROCEDURE "_toBool"();
108
109
110
--
111
-- PostgreSQL database dump complete
112
--