Skip to content
Permalink
Browse files
Fix query to detect postgis topology availability.
Closes #9453
  • Loading branch information
Sandro Santilli committed Feb 3, 2014
1 parent f45e112 commit da4c4292374d049fde2c238a20a0b726ee9cf48d
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/providers/postgres/qgspostgresconn.cpp
@@ -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;
}

0 comments on commit da4c429

Please sign in to comment.