Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Postgres] Use spatial index for tables using geography type (fixes #…
- Loading branch information
1 parent
1805d16
commit 3286753
Showing
4 changed files
with
124 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,14 @@ | ||
|
||
DROP TABLE IF EXISTS qgis_test.testgeog CASCADE; | ||
|
||
CREATE TABLE qgis_test.testgeog | ||
( | ||
pk SERIAL NOT NULL PRIMARY KEY, | ||
geog GEOGRAPHY | ||
); | ||
|
||
INSERT INTO qgis_test.testgeog(geog) VALUES ('POINT(40 0)'::geography); | ||
INSERT INTO qgis_test.testgeog(geog) VALUES ('POINT(40 60)'::geography); | ||
INSERT INTO qgis_test.testgeog(geog) VALUES ('POINT(40 -60)'::geography); | ||
|
||
CREATE INDEX testgeog_geog_idx ON qgis_test.testgeog USING GIST ( geog ); |