Skip to content

Commit 621eb50

Browse files
authored
Bugfixrelease0.7.2 (#171)
* bug fixes * add tests for date issue with loader * add changelog, change create or replace trigger to create trigger for pg 13
1 parent bccdcc7 commit 621eb50

File tree

13 files changed

+4380
-37
lines changed

13 files changed

+4380
-37
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file.
33

44
The format is based on [Keep a Changelog](http://keepachangelog.com/)
55
and this project adheres to [Semantic Versioning](http://semver.org/).
6+
## [v0.7.2]
7+
8+
### Fixed
9+
- Use version_parser for parsing versions in pypgstac
10+
- Fix issue with dropping functions/procedures in 0.6.13->0.7.0 migrations
11+
- Fix issue with CREATE OR REPLACE TRIGGER on PG 13
12+
- Fix issue identifying duplicate indexes in maintain_partition_queries function
13+
- Ensure that pgstac_read role has read permissions to all partitions
14+
- Fix issue (and add tests) caused by bug in psycopg datetime types not being able to translate 'infinity', '-infinity'
15+
616

717
## [v0.7.1]
818

src/pgstac/migrations/pgstac.0.6.13-0.7.0.sql

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,22 @@ SET ROLE pgstac_admin;
116116

117117
SET SEARCH_PATH TO pgstac, public;
118118

119-
DROP FUNCTION IF EXISTS analyze_items;
120-
DROP FUNCTION IF EXISTS validate_constraints;
119+
120+
DO $$
121+
BEGIN
122+
DROP FUNCTION IF EXISTS analyze_items;
123+
EXCEPTION WHEN others THEN
124+
RAISE NOTICE '%, skipping', SQLERRM USING ERRCODE = SQLSTATE;
125+
END
126+
$$;
127+
DO $$
128+
BEGIN
129+
DROP FUNCTION IF EXISTS validate_constraints;
130+
EXCEPTION WHEN others THEN
131+
RAISE NOTICE '%, skipping', SQLERRM USING ERRCODE = SQLSTATE;
132+
END
133+
$$;
134+
121135
SET client_min_messages TO WARNING;
122136
SET SEARCH_PATH to pgstac, public;
123137
-- BEGIN migra calculated SQL

src/pgstac/migrations/pgstac.0.7.0.sql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1810,19 +1810,19 @@ BEGIN
18101810
END;
18111811
$$ LANGUAGE PLPGSQL SECURITY DEFINER;
18121812

1813-
CREATE OR REPLACE TRIGGER items_after_insert_trigger
1813+
CREATE TRIGGER items_after_insert_trigger
18141814
AFTER INSERT ON items
18151815
REFERENCING NEW TABLE AS newdata
18161816
FOR EACH STATEMENT
18171817
EXECUTE FUNCTION partition_after_triggerfunc();
18181818

1819-
CREATE OR REPLACE TRIGGER items_after_update_trigger
1819+
CREATE TRIGGER items_after_update_trigger
18201820
AFTER DELETE ON items
18211821
REFERENCING OLD TABLE AS newdata
18221822
FOR EACH STATEMENT
18231823
EXECUTE FUNCTION partition_after_triggerfunc();
18241824

1825-
CREATE OR REPLACE TRIGGER items_after_delete_trigger
1825+
CREATE TRIGGER items_after_delete_trigger
18261826
AFTER UPDATE ON items
18271827
REFERENCING NEW TABLE AS newdata
18281828
FOR EACH STATEMENT

0 commit comments

Comments
 (0)