Skip to content

Commit

Permalink
Merge branch 'master' of github.com:qgis/QGIS
Browse files Browse the repository at this point in the history
  • Loading branch information
pcav committed Feb 3, 2014
2 parents 97cd120 + da4c429 commit 9ddfdd8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/providers/postgres/qgspostgresconn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -726,8 +726,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;
}
Expand Down

0 comments on commit 9ddfdd8

Please sign in to comment.