Skip to content

Commit 9ddfdd8

Browse files
committedFeb 3, 2014
Merge branch 'master' of github.com:qgis/QGIS
2 parents 97cd120 + da4c429 commit 9ddfdd8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎src/providers/postgres/qgspostgresconn.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -726,8 +726,8 @@ QString QgsPostgresConn::postgisVersion()
726726
mTopologyAvailable = false;
727727
if ( mPostgisVersionMajor > 1 )
728728
{
729-
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'" );
730-
if ( result.PQntuples() >= 1 )
729+
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' )" );
730+
if ( result.PQntuples() >= 1 && result.PQgetvalue(0, 0) == "t" )
731731
{
732732
mTopologyAvailable = true;
733733
}

0 commit comments

Comments
 (0)
Please sign in to comment.