Skip to content
GitLab
Explore
Sign in
Register
Commits on Source (3)
Ignore loading of pg_trgm extension if insufficient privileges. Closes: #906771
· 37e19e5b
Sebastien Jodogne
authored
Sep 03, 2018
37e19e5b
typo, upgrade Standards-Version
· 6458a6ab
Sebastien Jodogne
authored
Sep 03, 2018
6458a6ab
Upload to unstable
· 9683f775
Sebastien Jodogne
authored
Sep 03, 2018
9683f775
Show whitespace changes
Inline
Side-by-side
debian/changelog
View file @
9683f775
orthanc-postgresql (2.2-2) unstable; urgency=medium
* Ignore loading of pg_trgm extension if insufficient privileges. Closes: #906771
-- Sebastien Jodogne <s.jodogne@gmail.com> Mon, 03 Sep 2018 16:59:26 +0200
orthanc-postgresql (2.2-1) unstable; urgency=medium
* New upstream version
...
...
debian/control
View file @
9683f775
...
...
@@ -13,7 +13,7 @@ Build-Depends: cmake,
postgresql-server-dev-all,
unzip,
uuid-dev
Standards-Version: 4.
1.5
Standards-Version: 4.
2.1
Vcs-Browser: https://salsa.debian.org/med-team/orthanc-postgresql
Vcs-Git: https://salsa.debian.org/med-team/orthanc-postgresql.git
Homepage: https://www.orthanc-server.com/static.php?page=postgresql
...
...
debian/patches/pg_trgm
0 → 100644
View file @
9683f775
Description: Fix uncaught exception preventing db initialization (related to pg_trgm)
Author: Sebastien Jodogne <s.jodogne@gmail.com>
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
Index: OrthancPostgreSQL-2.2/PostgreSQL/Plugins/PostgreSQLIndex.cpp
===================================================================
--- OrthancPostgreSQL-2.2.orig/PostgreSQL/Plugins/PostgreSQLIndex.cpp
+++ OrthancPostgreSQL-2.2/PostgreSQL/Plugins/PostgreSQLIndex.cpp
@@ -113,6 +113,18 @@
namespace OrthancDatabases
SetGlobalIntegerProperty(*db, t, Orthanc::GlobalProperty_DatabasePatchLevel, revision);
}
+ if (revision != 1)
+ {
+ LOG(ERROR) << "PostgreSQL plugin is incompatible with database schema revision: " << revision;
+ throw Orthanc::OrthancException(Orthanc::ErrorCode_Database);
+ }
+
+ t.Commit();
+ }
+
+ {
+ PostgreSQLTransaction t(*db);
+
int hasTrigram = 0;
if (!LookupGlobalIntegerProperty(hasTrigram, *db, t, Orthanc::GlobalProperty_HasTrigramIndex) ||
hasTrigram != 1)
@@ -139,6 +151,8 @@
namespace OrthancDatabases
SetGlobalIntegerProperty(*db, t, Orthanc::GlobalProperty_HasTrigramIndex, 1);
LOG(WARNING) << "Trigram index has been created";
+
+ t.Commit();
}
catch (Orthanc::OrthancException&)
{
@@ -148,14 +162,6 @@
namespace OrthancDatabases
<< "PostgreSQL server, e.g. on Debian: sudo apt install postgresql-contrib";
}
}
-
- if (revision != 1)
- {
- LOG(ERROR) << "PostgreSQL plugin is incompatible with database schema revision: " << revision;
- throw Orthanc::OrthancException(Orthanc::ErrorCode_Database);
- }
-
- t.Commit();
}
return db.release();
debian/patches/series
View file @
9683f775
find-orthanc-dev
shlibs
pg_trgm