Skip to content
Permalink
Browse files

postgres provider: check pg_extension only on Pg>9

  • Loading branch information
jef-n committed Jun 3, 2015
1 parent 0af69ed commit 8ab005f87599c00d2ffd2edae633f7ff99945d06
Showing with 8 additions and 5 deletions.
  1. +8 −5 src/providers/postgres/qgspostgresconn.cpp
@@ -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;

0 comments on commit 8ab005f

Please sign in to comment.
You can’t perform that action at this time.