-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
41 additions
and
1 deletion.
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
24 changes: 24 additions & 0 deletions
24
gis/centreline/sql/create_matview_centreline_latest_all_feature.sql
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,24 @@ | ||
CREATE MATERIALIZED VIEW gis_core.centreline_latest_all_feature AS | ||
|
||
SELECT * | ||
FROM gis_core.centreline | ||
WHERE | ||
version_date = ( | ||
SELECT MAX(version_date) | ||
FROM gis_core.centreline | ||
); | ||
|
||
|
||
CREATE INDEX gis_core_centreline_latest_all_feature_geom ON gis_core.centreline_latest_all_feature USING gist (geom); | ||
|
||
CREATE UNIQUE INDEX centreline_latest_all_feature_unique | ||
ON gis_core.centreline_latest_all_feature USING btree( | ||
centreline_id ASC | ||
); | ||
|
||
ALTER MATERIALIZED VIEW gis_core.centreline_latest_all_feature OWNER TO gis_admins; | ||
|
||
GRANT SELECT ON gis_core.centreline_latest_all_feature TO bdit_humans, bdit_bots; | ||
|
||
COMMENT ON MATERIALIZED VIEW gis_core.centreline_latest_all_feature IS E'' | ||
'Materialized view containing the latest version of centreline with all feature code, derived from gis_core.centreline.'; |
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