-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathistore--0.1.7--0.1.8.sql
212 lines (199 loc) · 16.5 KB
/
istore--0.1.7--0.1.8.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
DO $$
DECLARE version_num integer;
BEGIN
SELECT current_setting('server_version_num') INTO STRICT version_num;
IF version_num > 90600 THEN
EXECUTE $E$ ALTER FUNCTION istore_in(cstring) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION istore_out(istore) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION istore_send(istore) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION istore_recv(internal) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION bigistore_in(cstring) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION bigistore_out(bigistore) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION bigistore_send(bigistore) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION bigistore_recv(internal) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION exist(istore, integer) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION fetchval(istore, integer) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION each(istore) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION min_key(istore) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION max_key(istore) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION compact(istore) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION add(istore, istore) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION add(istore, integer) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION subtract(istore, istore) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION subtract(istore, integer) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION multiply(istore, istore) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION multiply(istore, integer) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION divide(istore, istore) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION divide(istore, integer) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION concat(istore, istore) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION istore(integer[]) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION sum_up(istore) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION sum_up(istore, integer) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION istore(integer[], integer[]) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION fill_gaps(istore, integer, integer) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION accumulate(istore) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION accumulate(istore, integer) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION istore_seed(integer, integer, integer) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION istore_val_larger(istore, istore) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION istore_val_smaller(istore, istore) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION akeys(istore) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION avals(istore) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION skeys(istore) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION svals(istore) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION istore_sum_transfn(internal, istore) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION istore_min_transfn(internal, istore) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION istore_max_transfn(internal, istore) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION istore_agg_finalfn_pairs(internal) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION istore_to_json(istore) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION istore_to_array(istore) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION istore_to_matrix(istore) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION slice(istore, integer[]) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION slice_array(istore, integer[]) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION clamp_below(istore,int) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION clamp_above(istore,int) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION delete(istore,int) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION delete(istore,int[]) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION exists_all(istore,integer[]) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION exists_any(istore,integer[]) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION delete(istore, istore) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION bigistore_agg_finalfn(internal) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION istore_avl_transfn(internal, int, int) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION istore_avl_finalfn(internal) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION istore_length(istore) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION gin_extract_istore_key(internal, internal) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION gin_extract_istore_key_query(internal, internal, int2, internal, internal) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION gin_consistent_istore_key(internal, int2, internal, int4, internal, internal) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION istore(bigistore) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION bigistore(istore) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION exist(bigistore, integer) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION fetchval(bigistore, integer) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION each(is bigistore) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION min_key(bigistore) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION max_key(bigistore) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION compact(bigistore) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION add(bigistore, bigistore) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION add(bigistore, bigint) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION subtract(bigistore, bigistore) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION subtract(bigistore, bigint) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION multiply(bigistore, bigistore) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION multiply(bigistore, bigint) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION divide(bigistore, bigistore) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION divide(bigistore, bigint) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION concat(bigistore, bigistore) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION bigistore(integer[]) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION sum_up(bigistore) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION sum_up(bigistore, integer) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION bigistore(integer[], integer[]) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION bigistore(integer[], bigint[]) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION istore(integer[], bigint[]) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION fill_gaps(bigistore, integer, bigint) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION accumulate(bigistore) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION accumulate(bigistore, integer) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION istore_seed(integer, integer, bigint) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION istore_val_larger(bigistore, bigistore) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION istore_val_smaller(bigistore, bigistore) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION akeys(bigistore) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION avals(bigistore) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION skeys(bigistore) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION svals(bigistore) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION istore_length(bigistore) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION istore_to_json(bigistore) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION istore_to_array(bigistore) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION istore_to_matrix(bigistore) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION slice(bigistore, integer[]) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION slice_array(bigistore, integer[]) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION clamp_below(bigistore,int) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION clamp_above(bigistore,int) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION delete(bigistore,int) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION delete(bigistore,int[]) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION exists_all(bigistore,integer[]) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION exists_any(bigistore,integer[]) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION delete(bigistore,bigistore) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION istore_sum_transfn(internal, bigistore) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION istore_min_transfn(internal, bigistore) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION istore_max_transfn(internal, bigistore) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION bigistore_avl_transfn(internal, int, bigint) PARALLEL SAFE $E$;
EXECUTE $E$ ALTER FUNCTION bigistore_avl_finalfn(internal) PARALLEL SAFE $E$;
EXECUTE $E$ DROP AGGREGATE SUM (istore) $E$;
EXECUTE $E$ DROP AGGREGATE MIN (istore) $E$;
EXECUTE $E$ DROP AGGREGATE MAX (istore) $E$;
EXECUTE $E$ DROP AGGREGATE SUM (bigistore) $E$;
EXECUTE $E$ DROP AGGREGATE MIN (bigistore) $E$;
EXECUTE $E$ DROP AGGREGATE MAX (bigistore) $E$;
EXECUTE $E$ CREATE FUNCTION istore_agg_sum_combine(internal, internal)
RETURNS internal
AS 'istore'
LANGUAGE C IMMUTABLE PARALLEL SAFE $E$;
EXECUTE $E$ CREATE FUNCTION istore_agg_max_combine(internal, internal)
RETURNS internal
AS 'istore'
LANGUAGE C IMMUTABLE PARALLEL SAFE $E$;
EXECUTE $E$ CREATE FUNCTION istore_agg_min_combine(internal, internal)
RETURNS internal
AS 'istore'
LANGUAGE C IMMUTABLE PARALLEL SAFE $E$;
EXECUTE $E$ CREATE FUNCTION istore_agg_serial(internal)
RETURNS bytea
AS 'istore'
LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE $E$;
EXECUTE $E$ CREATE FUNCTION istore_agg_deserial(bytea, internal)
RETURNS internal
AS 'istore'
LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE $E$;
EXECUTE $E$ CREATE AGGREGATE SUM (istore) (
sfunc = istore_sum_transfn,
stype = internal,
finalfunc = bigistore_agg_finalfn,
combinefunc = istore_agg_sum_combine,
serialfunc = istore_agg_serial,
deserialfunc = istore_agg_deserial,
parallel = SAFE
) $E$ ;
EXECUTE $E$ CREATE AGGREGATE MIN (istore) (
sfunc = istore_min_transfn,
stype = internal,
finalfunc = istore_agg_finalfn_pairs,
combinefunc = istore_agg_min_combine,
serialfunc = istore_agg_serial,
deserialfunc = istore_agg_deserial,
parallel = SAFE
) $E$ ;
EXECUTE $E$ CREATE AGGREGATE MAX (istore) (
sfunc = istore_max_transfn,
stype = internal,
finalfunc = istore_agg_finalfn_pairs,
combinefunc = istore_agg_max_combine,
serialfunc = istore_agg_serial,
deserialfunc = istore_agg_deserial,
parallel = SAFE
) $E$ ;
EXECUTE $E$ CREATE AGGREGATE SUM (bigistore) (
sfunc = istore_sum_transfn,
stype = internal,
finalfunc = bigistore_agg_finalfn,
combinefunc = istore_agg_sum_combine,
serialfunc = istore_agg_serial,
deserialfunc = istore_agg_deserial,
parallel = SAFE
) $E$;
EXECUTE $E$ CREATE AGGREGATE MIN (bigistore) (
sfunc = istore_min_transfn,
stype = internal,
finalfunc = bigistore_agg_finalfn,
combinefunc = istore_agg_min_combine,
serialfunc = istore_agg_serial,
deserialfunc = istore_agg_deserial,
parallel = SAFE
) $E$;
EXECUTE $E$ CREATE AGGREGATE MAX (bigistore) (
sfunc = istore_max_transfn,
stype = internal,
finalfunc = bigistore_agg_finalfn,
combinefunc = istore_agg_max_combine,
serialfunc = istore_agg_serial,
deserialfunc = istore_agg_deserial,
parallel = SAFE
) $E$;
END IF;
END;
$$;