Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
2e0c47e5
Commit
2e0c47e5
authored
Sep 29, 2007
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support functions for index opclasses should be immutable.
Found by running opr_sanity on contrib modules.
parent
d80d8acb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
45 deletions
+45
-45
contrib/intarray/_int.sql.in
contrib/intarray/_int.sql.in
+45
-45
No files found.
contrib/intarray/_int.sql.in
View file @
2e0c47e5
...
...
@@ -12,12 +12,12 @@ BEGIN;
CREATE FUNCTION bqarr_in(cstring)
RETURNS query_int
AS 'MODULE_PATHNAME'
LANGUAGE C
RETURNS NULL ON NULL INPU
T IMMUTABLE;
LANGUAGE C
STRIC
T IMMUTABLE;
CREATE FUNCTION bqarr_out(query_int)
RETURNS cstring
AS 'MODULE_PATHNAME'
LANGUAGE C
RETURNS NULL ON NULL INPU
T IMMUTABLE;
LANGUAGE C
STRIC
T IMMUTABLE;
CREATE TYPE query_int (
INTERNALLENGTH = -1,
...
...
@@ -29,20 +29,20 @@ CREATE TYPE query_int (
CREATE FUNCTION querytree(query_int)
RETURNS text
AS 'MODULE_PATHNAME'
LANGUAGE C
RETURNS NULL ON NULL INPU
T IMMUTABLE;
LANGUAGE C
STRIC
T IMMUTABLE;
CREATE FUNCTION boolop(_int4, query_int)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C
RETURNS NULL ON NULL INPU
T IMMUTABLE;
LANGUAGE C
STRIC
T IMMUTABLE;
COMMENT ON FUNCTION boolop(_int4, query_int) IS 'boolean operation with array';
CREATE FUNCTION rboolop(query_int, _int4)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C
RETURNS NULL ON NULL INPU
T IMMUTABLE;
LANGUAGE C
STRIC
T IMMUTABLE;
COMMENT ON FUNCTION rboolop(query_int, _int4) IS 'boolean operation with array';
...
...
@@ -74,35 +74,35 @@ CREATE OPERATOR ~~ (
CREATE FUNCTION _int_contains(_int4, _int4)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C
RETURNS NULL ON NULL INPU
T IMMUTABLE;
LANGUAGE C
STRIC
T IMMUTABLE;
COMMENT ON FUNCTION _int_contains(_int4, _int4) IS 'contains';
CREATE FUNCTION _int_contained(_int4, _int4)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C
RETURNS NULL ON NULL INPU
T IMMUTABLE;
LANGUAGE C
STRIC
T IMMUTABLE;
COMMENT ON FUNCTION _int_contained(_int4, _int4) IS 'contained in';
CREATE FUNCTION _int_overlap(_int4, _int4)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C
RETURNS NULL ON NULL INPU
T IMMUTABLE;
LANGUAGE C
STRIC
T IMMUTABLE;
COMMENT ON FUNCTION _int_overlap(_int4, _int4) IS 'overlaps';
CREATE FUNCTION _int_same(_int4, _int4)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C
RETURNS NULL ON NULL INPU
T IMMUTABLE;
LANGUAGE C
STRIC
T IMMUTABLE;
COMMENT ON FUNCTION _int_same(_int4, _int4) IS 'same as';
CREATE FUNCTION _int_different(_int4, _int4)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C
RETURNS NULL ON NULL INPU
T IMMUTABLE;
LANGUAGE C
STRIC
T IMMUTABLE;
COMMENT ON FUNCTION _int_different(_int4, _int4) IS 'different';
...
...
@@ -111,12 +111,12 @@ COMMENT ON FUNCTION _int_different(_int4, _int4) IS 'different';
CREATE FUNCTION _int_union(_int4, _int4)
RETURNS _int4
AS 'MODULE_PATHNAME'
LANGUAGE C
RETURNS NULL ON NULL INPU
T IMMUTABLE;
LANGUAGE C
STRIC
T IMMUTABLE;
CREATE FUNCTION _int_inter(_int4, _int4)
RETURNS _int4
AS 'MODULE_PATHNAME'
LANGUAGE C
RETURNS NULL ON NULL INPU
T IMMUTABLE;
LANGUAGE C
STRIC
T IMMUTABLE;
--
-- OPERATORS
...
...
@@ -194,12 +194,12 @@ CREATE OPERATOR ~ (
CREATE FUNCTION intset(int4)
RETURNS _int4
AS 'MODULE_PATHNAME'
LANGUAGE C
RETURNS NULL ON NULL INPU
T IMMUTABLE;
LANGUAGE C
STRIC
T IMMUTABLE;
CREATE FUNCTION icount(_int4)
RETURNS int4
AS 'MODULE_PATHNAME'
LANGUAGE C
RETURNS NULL ON NULL INPU
T IMMUTABLE;
LANGUAGE C
STRIC
T IMMUTABLE;
CREATE OPERATOR # (
RIGHTARG = _int4,
...
...
@@ -209,32 +209,32 @@ CREATE OPERATOR # (
CREATE FUNCTION sort(_int4, text)
RETURNS _int4
AS 'MODULE_PATHNAME'
LANGUAGE C
RETURNS NULL ON NULL INPU
T IMMUTABLE;
LANGUAGE C
STRIC
T IMMUTABLE;
CREATE FUNCTION sort(_int4)
RETURNS _int4
AS 'MODULE_PATHNAME'
LANGUAGE C
RETURNS NULL ON NULL INPU
T IMMUTABLE;
LANGUAGE C
STRIC
T IMMUTABLE;
CREATE FUNCTION sort_asc(_int4)
RETURNS _int4
AS 'MODULE_PATHNAME'
LANGUAGE C
RETURNS NULL ON NULL INPU
T IMMUTABLE;
LANGUAGE C
STRIC
T IMMUTABLE;
CREATE FUNCTION sort_desc(_int4)
RETURNS _int4
AS 'MODULE_PATHNAME'
LANGUAGE C
RETURNS NULL ON NULL INPU
T IMMUTABLE;
LANGUAGE C
STRIC
T IMMUTABLE;
CREATE FUNCTION uniq(_int4)
RETURNS _int4
AS 'MODULE_PATHNAME'
LANGUAGE C
RETURNS NULL ON NULL INPU
T IMMUTABLE;
LANGUAGE C
STRIC
T IMMUTABLE;
CREATE FUNCTION idx(_int4, int4)
RETURNS int4
AS 'MODULE_PATHNAME'
LANGUAGE C
RETURNS NULL ON NULL INPU
T IMMUTABLE;
LANGUAGE C
STRIC
T IMMUTABLE;
CREATE OPERATOR # (
LEFTARG = _int4,
...
...
@@ -245,17 +245,17 @@ CREATE OPERATOR # (
CREATE FUNCTION subarray(_int4, int4, int4)
RETURNS _int4
AS 'MODULE_PATHNAME'
LANGUAGE C
RETURNS NULL ON NULL INPU
T IMMUTABLE;
LANGUAGE C
STRIC
T IMMUTABLE;
CREATE FUNCTION subarray(_int4, int4)
RETURNS _int4
AS 'MODULE_PATHNAME'
LANGUAGE C
RETURNS NULL ON NULL INPU
T IMMUTABLE;
LANGUAGE C
STRIC
T IMMUTABLE;
CREATE FUNCTION intarray_push_elem(_int4, int4)
RETURNS _int4
AS 'MODULE_PATHNAME'
LANGUAGE C
RETURNS NULL ON NULL INPU
T IMMUTABLE;
LANGUAGE C
STRIC
T IMMUTABLE;
CREATE OPERATOR + (
LEFTARG = _int4,
...
...
@@ -266,7 +266,7 @@ CREATE OPERATOR + (
CREATE FUNCTION intarray_push_array(_int4, _int4)
RETURNS _int4
AS 'MODULE_PATHNAME'
LANGUAGE C
RETURNS NULL ON NULL INPU
T IMMUTABLE;
LANGUAGE C
STRIC
T IMMUTABLE;
CREATE OPERATOR + (
LEFTARG = _int4,
...
...
@@ -278,7 +278,7 @@ CREATE OPERATOR + (
CREATE FUNCTION intarray_del_elem(_int4, int4)
RETURNS _int4
AS 'MODULE_PATHNAME'
LANGUAGE C
RETURNS NULL ON NULL INPU
T IMMUTABLE;
LANGUAGE C
STRIC
T IMMUTABLE;
CREATE OPERATOR - (
LEFTARG = _int4,
...
...
@@ -289,7 +289,7 @@ CREATE OPERATOR - (
CREATE FUNCTION intset_union_elem(_int4, int4)
RETURNS _int4
AS 'MODULE_PATHNAME'
LANGUAGE C
RETURNS NULL ON NULL INPU
T IMMUTABLE;
LANGUAGE C
STRIC
T IMMUTABLE;
CREATE OPERATOR | (
LEFTARG = _int4,
...
...
@@ -307,7 +307,7 @@ CREATE OPERATOR | (
CREATE FUNCTION intset_subtract(_int4, _int4)
RETURNS _int4
AS 'MODULE_PATHNAME'
LANGUAGE C
RETURNS NULL ON NULL INPU
T IMMUTABLE;
LANGUAGE C
STRIC
T IMMUTABLE;
CREATE OPERATOR - (
LEFTARG = _int4,
...
...
@@ -327,37 +327,37 @@ CREATE OPERATOR & (
CREATE FUNCTION g_int_consistent(internal,_int4,int4)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C;
LANGUAGE C
IMMUTABLE
;
CREATE FUNCTION g_int_compress(internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C;
LANGUAGE C
IMMUTABLE
;
CREATE FUNCTION g_int_decompress(internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C;
LANGUAGE C
IMMUTABLE
;
CREATE FUNCTION g_int_penalty(internal,internal,internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C
RETURNS NULL ON NULL INPU
T;
LANGUAGE C
IMMUTABLE STRIC
T;
CREATE FUNCTION g_int_picksplit(internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C;
LANGUAGE C
IMMUTABLE
;
CREATE FUNCTION g_int_union(internal, internal)
RETURNS _int4
AS 'MODULE_PATHNAME'
LANGUAGE C;
LANGUAGE C
IMMUTABLE
;
CREATE FUNCTION g_int_same(_int4, _int4, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C;
LANGUAGE C
IMMUTABLE
;
-- Create the operator class for indexing
...
...
@@ -388,12 +388,12 @@ DEFAULT FOR TYPE _int4 USING gist AS
CREATE FUNCTION _intbig_in(cstring)
RETURNS intbig_gkey
AS 'MODULE_PATHNAME'
LANGUAGE C
RETURNS NULL ON NULL INPU
T IMMUTABLE;
LANGUAGE C
STRIC
T IMMUTABLE;
CREATE FUNCTION _intbig_out(intbig_gkey)
RETURNS cstring
AS 'MODULE_PATHNAME'
LANGUAGE C
RETURNS NULL ON NULL INPU
T IMMUTABLE;
LANGUAGE C
STRIC
T IMMUTABLE;
CREATE TYPE intbig_gkey (
INTERNALLENGTH = -1,
...
...
@@ -404,37 +404,37 @@ CREATE TYPE intbig_gkey (
CREATE FUNCTION g_intbig_consistent(internal,internal,int4)
RETURNS bool
AS 'MODULE_PATHNAME'
LANGUAGE C;
LANGUAGE C
IMMUTABLE
;
CREATE FUNCTION g_intbig_compress(internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C;
LANGUAGE C
IMMUTABLE
;
CREATE FUNCTION g_intbig_decompress(internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C;
LANGUAGE C
IMMUTABLE
;
CREATE FUNCTION g_intbig_penalty(internal,internal,internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C
RETURNS NULL ON NULL INPU
T;
LANGUAGE C
IMMUTABLE STRIC
T;
CREATE FUNCTION g_intbig_picksplit(internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C;
LANGUAGE C
IMMUTABLE
;
CREATE FUNCTION g_intbig_union(internal, internal)
RETURNS _int4
AS 'MODULE_PATHNAME'
LANGUAGE C;
LANGUAGE C
IMMUTABLE
;
CREATE FUNCTION g_intbig_same(internal, internal, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C;
LANGUAGE C
IMMUTABLE
;
-- register the opclass for indexing (not as default)
...
...
@@ -462,12 +462,12 @@ AS
CREATE FUNCTION ginint4_queryextract(internal, internal, int2)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C;
LANGUAGE C
IMMUTABLE
;
CREATE FUNCTION ginint4_consistent(internal, int2, internal)
RETURNS internal
AS 'MODULE_PATHNAME'
LANGUAGE C;
LANGUAGE C
IMMUTABLE
;
CREATE OPERATOR CLASS gin__int_ops
FOR TYPE _int4 USING gin
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment