Skip to content

Commit d80d8ac

Browse files
committed
Support functions for index opclasses should be immutable.
Found by running opr_sanity on contrib modules.
1 parent 9226630 commit d80d8ac

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

contrib/hstore/hstore.sql.in

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -186,37 +186,37 @@ CREATE TYPE ghstore (
186186
CREATE FUNCTION ghstore_compress(internal)
187187
RETURNS internal
188188
AS 'MODULE_PATHNAME'
189-
LANGUAGE C;
189+
LANGUAGE C IMMUTABLE;
190190

191191
CREATE FUNCTION ghstore_decompress(internal)
192192
RETURNS internal
193193
AS 'MODULE_PATHNAME'
194-
LANGUAGE C;
194+
LANGUAGE C IMMUTABLE;
195195

196196
CREATE FUNCTION ghstore_penalty(internal,internal,internal)
197197
RETURNS internal
198198
AS 'MODULE_PATHNAME'
199-
LANGUAGE C STRICT;
199+
LANGUAGE C IMMUTABLE STRICT;
200200

201201
CREATE FUNCTION ghstore_picksplit(internal, internal)
202202
RETURNS internal
203203
AS 'MODULE_PATHNAME'
204-
LANGUAGE C;
204+
LANGUAGE C IMMUTABLE;
205205

206206
CREATE FUNCTION ghstore_union(internal, internal)
207207
RETURNS internal
208208
AS 'MODULE_PATHNAME'
209-
LANGUAGE C;
209+
LANGUAGE C IMMUTABLE;
210210

211211
CREATE FUNCTION ghstore_same(internal, internal, internal)
212212
RETURNS internal
213213
AS 'MODULE_PATHNAME'
214-
LANGUAGE C;
214+
LANGUAGE C IMMUTABLE;
215215

216216
CREATE FUNCTION ghstore_consistent(internal,internal,int4)
217217
RETURNS bool
218218
AS 'MODULE_PATHNAME'
219-
LANGUAGE C;
219+
LANGUAGE C IMMUTABLE;
220220

221221
-- register the opclass for indexing (not as default)
222222
CREATE OPERATOR CLASS gist_hstore_ops
@@ -241,23 +241,23 @@ AS
241241
CREATE FUNCTION gin_extract_hstore(internal, internal)
242242
RETURNS internal
243243
AS 'MODULE_PATHNAME'
244-
LANGUAGE C;
244+
LANGUAGE C IMMUTABLE;
245245

246246
CREATE FUNCTION gin_extract_hstore_query(internal, internal, int2)
247247
RETURNS internal
248248
AS 'MODULE_PATHNAME'
249-
LANGUAGE C;
249+
LANGUAGE C IMMUTABLE;
250250

251251
CREATE FUNCTION gin_consistent_hstore(internal, int2, internal)
252252
RETURNS internal
253253
AS 'MODULE_PATHNAME'
254-
LANGUAGE C;
254+
LANGUAGE C IMMUTABLE;
255255

256256
CREATE OPERATOR CLASS gin_hstore_ops
257257
DEFAULT FOR TYPE hstore USING gin
258258
AS
259259
OPERATOR 7 @> RECHECK,
260-
OPERATOR 9 ?(hstore,text),
260+
OPERATOR 9 ?(hstore,text),
261261
FUNCTION 1 bttextcmp(text,text),
262262
FUNCTION 2 gin_extract_hstore(internal, internal),
263263
FUNCTION 3 gin_extract_hstore_query(internal, internal, int2),

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy