-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Besides hash indexes on spoint, this enables "select distinct spoint from tbl" queries. Close #101.
- Loading branch information
Showing
7 changed files
with
109 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
CREATE FUNCTION spoint_hash32 (spoint) | ||
RETURNS int | ||
IMMUTABLE STRICT | ||
PARALLEL SAFE | ||
LANGUAGE C | ||
AS 'MODULE_PATHNAME', 'spherepoint_hash32'; | ||
|
||
UPDATE pg_operator | ||
SET oprcanhash = true | ||
WHERE oprname = '=' AND | ||
oprleft = 'spoint'::regtype AND oprright = 'spoint'::regtype; | ||
|
||
/* PG17: ALTER OPERATOR = (spoint, spoint) SET (HASHES); */ | ||
|
||
CREATE OPERATOR CLASS spoint_hash_ops | ||
DEFAULT FOR TYPE spoint USING hash | ||
AS | ||
OPERATOR 1 = (spoint, spoint), | ||
FUNCTION 1 spoint_hash32(spoint); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters