-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathistore--0.1.5--0.1.6.sql
223 lines (212 loc) · 4.81 KB
/
istore--0.1.5--0.1.6.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
212
213
214
215
216
217
218
219
220
221
222
223
----functions----
CREATE OR REPLACE FUNCTION concat(istore, istore)
RETURNS istore
LANGUAGE c
IMMUTABLE STRICT
AS 'istore', $function$istore_concat$function$;
----
CREATE OR REPLACE FUNCTION max_key(istore)
RETURNS integer
LANGUAGE c
IMMUTABLE STRICT
AS 'istore', $function$istore_max_key$function$;
----
CREATE OR REPLACE FUNCTION min_key(istore)
RETURNS integer
LANGUAGE c
IMMUTABLE STRICT
AS 'istore', $function$istore_min_key$function$;
----
CREATE OR REPLACE FUNCTION delete(bigistore, bigistore)
RETURNS bigistore
LANGUAGE c
IMMUTABLE STRICT
AS 'istore', $function$bigistore_delete_istore$function$;
----
CREATE OR REPLACE FUNCTION exists_any(bigistore, integer[])
RETURNS boolean
LANGUAGE c
IMMUTABLE STRICT
AS 'istore', $function$bigistore_exists_any$function$;
----
CREATE OR REPLACE FUNCTION exists_all(bigistore, integer[])
RETURNS boolean
LANGUAGE c
IMMUTABLE STRICT
AS 'istore', $function$bigistore_exists_all$function$;
----
CREATE OR REPLACE FUNCTION delete(bigistore, integer[])
RETURNS bigistore
LANGUAGE c
IMMUTABLE STRICT
AS 'istore', $function$bigistore_delete_array$function$;
----
CREATE OR REPLACE FUNCTION delete(bigistore, integer)
RETURNS bigistore
LANGUAGE c
IMMUTABLE STRICT
AS 'istore', $function$bigistore_delete$function$;
----
CREATE OR REPLACE FUNCTION slice_array(bigistore, integer[])
RETURNS integer[]
LANGUAGE c
IMMUTABLE STRICT
AS 'istore', $function$bigistore_slice_to_array$function$;
----
CREATE OR REPLACE FUNCTION slice(bigistore, integer[])
RETURNS bigistore
LANGUAGE c
IMMUTABLE STRICT
AS 'istore', $function$bigistore_slice$function$;
----
CREATE OR REPLACE FUNCTION istore_to_matrix(bigistore)
RETURNS integer[]
LANGUAGE c
IMMUTABLE STRICT
AS 'istore', $function$bigistore_to_matrix$function$;
----
CREATE OR REPLACE FUNCTION istore_to_array(bigistore)
RETURNS integer[]
LANGUAGE c
IMMUTABLE STRICT
AS 'istore', $function$bigistore_to_array$function$;
----
CREATE OR REPLACE FUNCTION concat(bigistore, bigistore)
RETURNS bigistore
LANGUAGE c
IMMUTABLE STRICT
AS 'istore', $function$bigistore_concat$function$;
----
CREATE OR REPLACE FUNCTION max_key(bigistore)
RETURNS integer
LANGUAGE c
IMMUTABLE STRICT
AS 'istore', $function$bigistore_max_key$function$;
----
CREATE OR REPLACE FUNCTION min_key(bigistore)
RETURNS integer
LANGUAGE c
IMMUTABLE STRICT
AS 'istore', $function$bigistore_min_key$function$;
----
CREATE OR REPLACE FUNCTION delete(istore, istore)
RETURNS istore
LANGUAGE c
IMMUTABLE STRICT
AS 'istore', $function$istore_delete_istore$function$;
----
CREATE OR REPLACE FUNCTION exists_any(istore, integer[])
RETURNS boolean
LANGUAGE c
IMMUTABLE STRICT
AS 'istore', $function$istore_exists_any$function$;
----
CREATE OR REPLACE FUNCTION exists_all(istore, integer[])
RETURNS boolean
LANGUAGE c
IMMUTABLE STRICT
AS 'istore', $function$istore_exists_all$function$;
----
CREATE OR REPLACE FUNCTION delete(istore, integer[])
RETURNS istore
LANGUAGE c
IMMUTABLE STRICT
AS 'istore', $function$istore_delete_array$function$;
----
CREATE OR REPLACE FUNCTION delete(istore, integer)
RETURNS istore
LANGUAGE c
IMMUTABLE STRICT
AS 'istore', $function$istore_delete$function$;
----
CREATE OR REPLACE FUNCTION slice_array(istore, integer[])
RETURNS integer[]
LANGUAGE c
IMMUTABLE STRICT
AS 'istore', $function$istore_slice_to_array$function$;
----
CREATE OR REPLACE FUNCTION slice(istore, integer[])
RETURNS istore
LANGUAGE c
IMMUTABLE STRICT
AS 'istore', $function$istore_slice$function$;
----
CREATE OR REPLACE FUNCTION istore_to_matrix(istore)
RETURNS integer[]
LANGUAGE c
IMMUTABLE STRICT
AS 'istore', $function$istore_to_matrix$function$;
----
CREATE OR REPLACE FUNCTION istore_to_array(istore)
RETURNS integer[]
LANGUAGE c
IMMUTABLE STRICT
AS 'istore', $function$istore_to_array$function$;
----operators----
CREATE OPERATOR ?& (
PROCEDURE = exists_all,
LEFTARG = bigistore,
RIGHTARG = _int4
);
----
CREATE OPERATOR %# (
PROCEDURE = istore_to_matrix,
RIGHTARG = bigistore
);
----
CREATE OPERATOR %% (
PROCEDURE = istore_to_array,
RIGHTARG = bigistore
);
----
CREATE OPERATOR -> (
PROCEDURE = slice_array,
LEFTARG = bigistore,
RIGHTARG = _int4
);
----
CREATE OPERATOR -> (
PROCEDURE = slice_array,
LEFTARG = istore,
RIGHTARG = _int4
);
----
CREATE OPERATOR || (
PROCEDURE = concat,
LEFTARG = bigistore,
RIGHTARG = bigistore
);
----
CREATE OPERATOR ?| (
PROCEDURE = exists_any,
LEFTARG = bigistore,
RIGHTARG = _int4
);
----
CREATE OPERATOR %# (
PROCEDURE = istore_to_matrix,
RIGHTARG = istore
);
----
CREATE OPERATOR %% (
PROCEDURE = istore_to_array,
RIGHTARG = istore
);
----
CREATE OPERATOR || (
PROCEDURE = concat,
LEFTARG = istore,
RIGHTARG = istore
);
----
CREATE OPERATOR ?| (
PROCEDURE = exists_any,
LEFTARG = istore,
RIGHTARG = _int4
);
----
CREATE OPERATOR ?& (
PROCEDURE = exists_all,
LEFTARG = istore,
RIGHTARG = _int4
);