[postgis-tickets] r16078 - Stricter error tolerance on unpackaged upgrade
Sandro Santilli
strk at kbt.io
Sun Oct 29 11:38:53 PDT 2017
Author: strk
Date: 2017-10-29 11:38:53 -0700 (Sun, 29 Oct 2017)
New Revision: 16078
Modified:
trunk/utils/create_unpackaged.pl
Log:
Stricter error tolerance on unpackaged upgrade
Prevents concerns about "object_not_in_prerequisite_state" being
possibly thrown for errors other than "already in extension"
See #3919
NOTE: this check may be to strict in that it depends on locale
settings
Modified: trunk/utils/create_unpackaged.pl
===================================================================
--- trunk/utils/create_unpackaged.pl 2017-10-29 18:04:17 UTC (rev 16077)
+++ trunk/utils/create_unpackaged.pl 2017-10-29 18:38:53 UTC (rev 16078)
@@ -134,7 +134,12 @@
ALTER EXTENSION $extname ADD $obj;
RAISE NOTICE 'newly registered $obj';
EXCEPTION WHEN object_not_in_prerequisite_state THEN
- RAISE NOTICE 'already registered $obj';
+ IF SQLERRM like '% already a member of extension "$extname"'
+ THEN
+ RAISE NOTICE 'already registered $obj';
+ ELSE
+ RAISE EXCEPTION '%', SQLERRM;
+ END IF;
END;
\$\$ LANGUAGE 'plpgsql';
EOF
More information about the postgis-tickets
mailing list