[qgis] 06/13: Add patch to fix postgis topology availability detection query.
Bas Couwenberg
sebastic at xs4all.nl
Fri Feb 14 17:08:19 UTC 2014
This is an automated email from the git hooks/post-receive script.
sebastic-guest pushed a commit to branch master
in repository qgis.
commit d7c76b624dd525861bc1e89c757281459e557c02
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date: Sat Feb 8 05:50:52 2014 +0100
Add patch to fix postgis topology availability detection query.
---
debian/changelog | 1 +
...-query-to-detect-postgis-topology-availability.patch | 17 +++++++++++++++++
debian/patches/series | 1 +
3 files changed, 19 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index f9c8abc..3ed18f6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -12,6 +12,7 @@ qgis (2.0.1-2) UNRELEASED; urgency=low
* Additional checks in qgis-providers-common.postinst
* Add patch to fix mis-detection of PostGIS table types.
* Add patch to not look for topology layers without topology support.
+ * Add patch to fix postgis topology availability detection query.
-- Bas Couwenberg <sebastic at xs4all.nl> Fri, 31 Jan 2014 19:42:03 +0100
diff --git a/debian/patches/fix-query-to-detect-postgis-topology-availability.patch b/debian/patches/fix-query-to-detect-postgis-topology-availability.patch
new file mode 100644
index 0000000..4533e1f
--- /dev/null
+++ b/debian/patches/fix-query-to-detect-postgis-topology-availability.patch
@@ -0,0 +1,17 @@
+From: Sandro Santilli <strk at keybit.net>
+Subject: Fix query to detect postgis topology availability.
+Origin: https://github.com/qgis/QGIS/commit/f8028087ad533307774c79afceb3580d27466664
+Bug: http://hub.qgis.org/issues/9453
+--- a/src/providers/postgres/qgspostgresconn.cpp
++++ b/src/providers/postgres/qgspostgresconn.cpp
+@@ -712,8 +712,8 @@ QString QgsPostgresConn::postgisVersion()
+ mTopologyAvailable = false;
+ if ( mPostgisVersionMajor > 1 )
+ {
+- QgsPostgresResult result = PQexec( "SELECT count(c.oid) FROM pg_class AS c JOIN pg_namespace AS n ON c.relnamespace=n.oid WHERE n.nspname='topology' AND c.relname='topology'" );
+- if ( result.PQntuples() >= 1 )
++ QgsPostgresResult result = PQexec( "SELECT EXISTS ( SELECT c.oid FROM pg_class AS c JOIN pg_namespace AS n ON c.relnamespace=n.oid WHERE n.nspname='topology' AND c.relname='topology' )" );
++ if ( result.PQntuples() >= 1 && result.PQgetvalue(0, 0) == "t" )
+ {
+ mTopologyAvailable = true;
+ }
diff --git a/debian/patches/series b/debian/patches/series
index 2f6dcf2..82af183 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -29,3 +29,4 @@ use-local-icon.patch
fix-qreal-vs-double.patch
mis-detection-of-PostGIS-table-type.patch
postgres-provider-topology-support.patch
+fix-query-to-detect-postgis-topology-availability.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/qgis.git
More information about the Pkg-grass-devel
mailing list