Bug fix. Not sure how postgresql access worked in the previous revision!

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@2879 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
g_j_m 2005-03-01 02:07:45 +00:00
parent ef5ab08501
commit 2cb2d3902f

View File

@ -264,6 +264,8 @@ void QgsDbSourceSelect::addLayer(QListBoxItem * item)
bool QgsDbSourceSelect::getGeometryColumnInfo(PGconn *pg,
geomCol& details)
{
bool ok = false;
QString sql = "select * from geometry_columns";
// where f_table_schema ='" + settings.readEntry(key + "/database") + "'";
sql += " order by f_table_name";
@ -296,6 +298,7 @@ bool QgsDbSourceSelect::getGeometryColumnInfo(PGconn *pg,
details.push_back(geomPair(v, type));
}
ok = true;
}
PQclear(result);
@ -346,7 +349,11 @@ bool QgsDbSourceSelect::getGeometryColumnInfo(PGconn *pg,
}
PQclear(gresult);
}
ok = true;
}
PQclear(result);
return ok;
}