Skip to content

Commit

Permalink
Do not query geography_columns on postgis < 1.5
Browse files Browse the repository at this point in the history
Fixes #38580
  • Loading branch information
elpaso committed Sep 3, 2020
1 parent 4b8797d commit 0fe7a62
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/providers/postgres/qgspostgresconn.cpp
Expand Up @@ -488,7 +488,8 @@ bool QgsPostgresConn::getTableInfo( bool searchGeometryColumnsOnly, bool searchP
dimName = QStringLiteral( "l.coord_dimension" );
gtableName = QStringLiteral( "geometry_columns" );
}
else if ( i == SctGeography )
// Geography since postgis 1.5
else if ( i == SctGeography && mPostgisVersionMajor >= 1 && mPostgisVersionMinor >= 5 )
{
tableName = QStringLiteral( "l.f_table_name" );
schemaName = QStringLiteral( "l.f_table_schema" );
Expand Down

0 comments on commit 0fe7a62

Please sign in to comment.