Skip to content

Commit c8e5725

Browse files
author
g_j_m
committed
Fix for ticket #153.
The attribute table was failing to display the contents of the last column in a table for tables where the geometry column was not the last in the table. git-svn-id: http://svn.osgeo.org/qgis/trunk@5552 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 36c5e22 commit c8e5725

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/providers/postgres/qgspostgresprovider.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -734,7 +734,7 @@ void QgsPostgresProvider::getFeatureAttributes(int key, int &row, QgsFeature *f)
734734
#endif
735735
PGresult *attr = PQexec(connection, (const char *)(sql.utf8()));
736736

737-
for (int i = 0; i < fieldCount(); i++) {
737+
for (int i = 0; i < PQntuples(attr); i++) {
738738
QString fld = PQfname(attr, i);
739739
// Dont add the WKT representation of the geometry column to the identify
740740
// results

0 commit comments

Comments
 (0)