Skip to content

Commit dda5771

Browse files
committedNov 10, 2019
Fix loading of PostgreSQL geometry-less views
Closes #32523 Bug was introduced with commit bbdbca4 Thanks @elpaso for finding the root cause of it
1 parent ea970d9 commit dda5771

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎src/providers/postgres/qgspostgresconn.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -838,11 +838,11 @@ bool QgsPostgresConn::getTableInfo( bool searchGeometryColumnsOnly, bool searchP
838838
QString table = result.PQgetvalue( i, 0 ); // relname
839839
QString schema = result.PQgetvalue( i, 1 ); // nspname
840840
QString relkind = result.PQgetvalue( i, 2 ); // relation kind
841-
QString attributes = result.PQgetvalue( i, 3 ); // attributes array
841+
QString comment = result.PQgetvalue( i, 3 ); // table comment
842+
QString attributes = result.PQgetvalue( i, 4 ); // attributes array
842843
bool isView = relkind == QLatin1String( "v" ) || relkind == QLatin1String( "m" );
843844
bool isMaterializedView = relkind == QLatin1String( "m" );
844845
bool isForeignTable = relkind == QLatin1String( "f" );
845-
QString comment = result.PQgetvalue( i, 3 ); // table comment
846846

847847
//QgsDebugMsg( QStringLiteral( "%1.%2: %3" ).arg( schema ).arg( table ).arg( relkind ) );
848848

0 commit comments

Comments
 (0)
Please sign in to comment.