Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove default eo:cloud_cover queryable #210

Merged
merged 2 commits into from
Sep 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/src/pgstac.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ In general, you should aim to keep each partition less than a few hundred thousa

#### PGStac Indexes / Queryables

By default, PGStac includes indexes on the id, datetime, collection, geometry, and the eo:cloud_cover property. Further indexing can be added for additional properties globally or only on particular collections by modifications to the queryables table.
By default, PGStac includes indexes on the id, datetime, collection, and geometry. Further indexing can be added for additional properties globally or only on particular collections by modifications to the queryables table.

The `queryables` table controls the indexes that PGStac will build as well as the metadata that is returned from a [STAC Queryables endpoint](https://github.com/stac-api-extensions/filter#queryables).

Expand Down
9 changes: 0 additions & 9 deletions src/pgstac/migrations/pgstac.0.7.10-unreleased.sql
Original file line number Diff line number Diff line change
Expand Up @@ -286,15 +286,6 @@ DO $$
END
$$;

DO $$
BEGIN
INSERT INTO queryables (name, definition, property_wrapper, property_index_type) VALUES
('eo:cloud_cover','{"$ref": "https://stac-extensions.github.io/eo/v1.0.0/schema.json#/definitions/fieldsproperties/eo:cloud_cover"}','to_int','BTREE');
EXCEPTION WHEN unique_violation THEN
RAISE NOTICE '%', SQLERRM USING ERRCODE = SQLSTATE;
END
$$;

DELETE FROM queryables a USING queryables b
WHERE a.name = b.name AND a.collection_ids IS NOT DISTINCT FROM b.collection_ids AND a.id > b.id;

Expand Down
9 changes: 0 additions & 9 deletions src/pgstac/migrations/pgstac.unreleased.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4069,15 +4069,6 @@ DO $$
END
$$;

DO $$
BEGIN
INSERT INTO queryables (name, definition, property_wrapper, property_index_type) VALUES
('eo:cloud_cover','{"$ref": "https://stac-extensions.github.io/eo/v1.0.0/schema.json#/definitions/fieldsproperties/eo:cloud_cover"}','to_int','BTREE');
EXCEPTION WHEN unique_violation THEN
RAISE NOTICE '%', SQLERRM USING ERRCODE = SQLSTATE;
END
$$;

DELETE FROM queryables a USING queryables b
WHERE a.name = b.name AND a.collection_ids IS NOT DISTINCT FROM b.collection_ids AND a.id > b.id;

Expand Down
9 changes: 0 additions & 9 deletions src/pgstac/sql/998_idempotent_post.sql
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,6 @@ DO $$
END
$$;

DO $$
BEGIN
INSERT INTO queryables (name, definition, property_wrapper, property_index_type) VALUES
('eo:cloud_cover','{"$ref": "https://stac-extensions.github.io/eo/v1.0.0/schema.json#/definitions/fieldsproperties/eo:cloud_cover"}','to_int','BTREE');
EXCEPTION WHEN unique_violation THEN
RAISE NOTICE '%', SQLERRM USING ERRCODE = SQLSTATE;
END
$$;

DELETE FROM queryables a USING queryables b
WHERE a.name = b.name AND a.collection_ids IS NOT DISTINCT FROM b.collection_ids AND a.id > b.id;

Expand Down