Skip to content

Commit

Permalink
postgres provider: check pg_extension only on Pg>9
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Jun 3, 2015
1 parent 0af69ed commit 8ab005f
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/providers/postgres/qgspostgresconn.cpp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -868,12 +868,15 @@ QString QgsPostgresConn::postgisVersion()


mGotPostgisVersion = true; mGotPostgisVersion = true;


QgsDebugMsg( "Checking for pointcloud support" ); if ( mPostgresqlVersion >= 90000 )
result = PQexec( "SELECT oid FROM pg_catalog.pg_extension WHERE extname = 'pointcloud_postgis'", false );
if ( result.PQntuples() == 1 )
{ {
mPointcloudAvailable = true; QgsDebugMsg( "Checking for pointcloud support" );
QgsDebugMsg( "Pointcloud support available!" ); result = PQexec( "SELECT oid FROM pg_catalog.pg_extension WHERE extname = 'pointcloud_postgis'", false );
if ( result.PQntuples() == 1 )
{
mPointcloudAvailable = true;
QgsDebugMsg( "Pointcloud support available!" );
}
} }


return mPostgisVersionInfo; return mPostgisVersionInfo;
Expand Down

0 comments on commit 8ab005f

Please sign in to comment.