Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
postgres provider: check pg_extension only on Pg>9
  • 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
Expand Up @@ -868,12 +868,15 @@ QString QgsPostgresConn::postgisVersion()

mGotPostgisVersion = true;

QgsDebugMsg( "Checking for pointcloud support" );
result = PQexec( "SELECT oid FROM pg_catalog.pg_extension WHERE extname = 'pointcloud_postgis'", false );
if ( result.PQntuples() == 1 )
if ( mPostgresqlVersion >= 90000 )
{
mPointcloudAvailable = true;
QgsDebugMsg( "Pointcloud support available!" );
QgsDebugMsg( "Checking for pointcloud support" );
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;
Expand Down

0 comments on commit 8ab005f

Please sign in to comment.