@@ -393,7 +393,8 @@ bool QgsPostgresConn::getTableInfo( bool searchGeometryColumnsOnly, bool searchP
393
393
}
394
394
else if ( i == sctTopoGeometry )
395
395
{
396
- if ( ! hasTopology () ) continue ;
396
+ if ( !hasTopology () )
397
+ continue ;
397
398
398
399
schemaName = " l.schema_name" ;
399
400
tableName = " l.table_name" ;
@@ -411,7 +412,8 @@ bool QgsPostgresConn::getTableInfo( bool searchGeometryColumnsOnly, bool searchP
411
412
}
412
413
else if ( i == sctPcPatch )
413
414
{
414
- if ( ! hasPointcloud () ) continue ;
415
+ if ( !hasPointcloud () )
416
+ continue ;
415
417
416
418
tableName = " l.\" table\" " ;
417
419
schemaName = " l.\" schema\" " ;
@@ -757,7 +759,6 @@ bool QgsPostgresConn::hasGEOS()
757
759
{
758
760
// make sure info is up to date for the current connection
759
761
postgisVersion ();
760
- // get geos capability
761
762
return mGeosAvailable ;
762
763
}
763
764
@@ -768,7 +769,6 @@ bool QgsPostgresConn::hasTopology()
768
769
{
769
770
// make sure info is up to date for the current connection
770
771
postgisVersion ();
771
- // get topology capability
772
772
return mTopologyAvailable ;
773
773
}
774
774
@@ -777,9 +777,9 @@ bool QgsPostgresConn::hasTopology()
777
777
*/
778
778
bool QgsPostgresConn::hasPointcloud ()
779
779
{
780
- // TODO: use mPointcloudAvailable function instead
781
- QgsPostgresResult result = PQexec ( " SELECT 'pointcloud_columns'::regclass " );
782
- return result. PQntuples () == 1 ;
780
+ // make sure info is up to date for the current connection
781
+ postgisVersion ( );
782
+ return mPointcloudAvailable ;
783
783
}
784
784
785
785
/* Functions for determining available features in postGIS */
@@ -866,6 +866,9 @@ QString QgsPostgresConn::postgisVersion()
866
866
867
867
mGotPostgisVersion = true ;
868
868
869
+ result = PQexec ( " SELECT 'pointcloud_columns'::regclass" , false );
870
+ mPointcloudAvailable = result.PQntuples () == 1 ;
871
+
869
872
return mPostgisVersionInfo ;
870
873
}
871
874
0 commit comments