Skip to content

Commit 8ab005f

Browse files
committedJun 3, 2015
postgres provider: check pg_extension only on Pg>9
1 parent 0af69ed commit 8ab005f

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed
 

‎src/providers/postgres/qgspostgresconn.cpp

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -868,12 +868,15 @@ QString QgsPostgresConn::postgisVersion()
868868

869869
mGotPostgisVersion = true;
870870

871-
QgsDebugMsg( "Checking for pointcloud support" );
872-
result = PQexec( "SELECT oid FROM pg_catalog.pg_extension WHERE extname = 'pointcloud_postgis'", false );
873-
if ( result.PQntuples() == 1 )
871+
if ( mPostgresqlVersion >= 90000 )
874872
{
875-
mPointcloudAvailable = true;
876-
QgsDebugMsg( "Pointcloud support available!" );
873+
QgsDebugMsg( "Checking for pointcloud support" );
874+
result = PQexec( "SELECT oid FROM pg_catalog.pg_extension WHERE extname = 'pointcloud_postgis'", false );
875+
if ( result.PQntuples() == 1 )
876+
{
877+
mPointcloudAvailable = true;
878+
QgsDebugMsg( "Pointcloud support available!" );
879+
}
877880
}
878881

879882
return mPostgisVersionInfo;

0 commit comments

Comments
 (0)
Please sign in to comment.