From a697d7b49befcdedd65a35a842eaca6fe27c82b9 Mon Sep 17 00:00:00 2001 From: Emmanuel Blondel Date: Fri, 30 Jul 2021 22:10:20 +0200 Subject: [PATCH] Update create_view_area_labels.sql --- tunaatlas_sql/create_view_area_labels.sql | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tunaatlas_sql/create_view_area_labels.sql b/tunaatlas_sql/create_view_area_labels.sql index 8680d65..a132e7a 100644 --- a/tunaatlas_sql/create_view_area_labels.sql +++ b/tunaatlas_sql/create_view_area_labels.sql @@ -54,18 +54,18 @@ COMMENT ON COLUMN "area"."area_labels"."source_french_label" IS '"source_french_ COMMENT ON COLUMN "area"."area_labels"."source_spanish_label" IS '"source_spanish_label" gives the label of the area in spanish.'; COMMENT ON COLUMN "area"."area_labels"."geom" IS '"geom" is the geometry stored by Postgis (SFS format).'; - +DROP VIEW IF EXISTS area.grid_area_labels; CREATE MATERIALIZED VIEW area.grid_area_labels AS SELECT * FROM area.area_labels WHERE tablesource_area = 'areas_tuna_rfmos_task2'; - CREATE INDEX grid_area_labels_id_area_idx ON area.grid_area_labels (id_area); CREATE INDEX grid_area_labels_codesource_area_idx ON area.grid_area_labels (codesource_area); - -create materialized view area.grid_5deg_area_labels as SELECT * FROM area.grid_area_labels where codesource_area like '6%'; +DROP VIEW IF EXISTS area.grid_5deg_area_labels; +create MATERIALIZED VIEW area.grid_5deg_area_labels as SELECT * FROM area.grid_area_labels where codesource_area like '6%'; CREATE INDEX grid_area_5deg_labels_id_area_idx ON area.grid_5deg_area_labels (id_area); CREATE INDEX grid_area_5deg_labels_codesource_area_idx ON area.grid_5deg_area_labels (codesource_area); -create materialized view area.grid_1deg_area_labels as SELECT * FROM area.grid_area_labels where codesource_area like '5%'; +DROP VIEW IF EXISTS area.grid_1deg_area_labels; +create MATERIALIZED VIEW area.grid_1deg_area_labels as SELECT * FROM area.grid_area_labels where codesource_area like '5%'; CREATE INDEX grid_area_1deg_labels_id_area_idx ON area.grid_1deg_area_labels (id_area); CREATE INDEX grid_area_1deg_labels_codesource_area_idx ON area.grid_1deg_area_labels (codesource_area);