Skip to content

Commit

Permalink
fix for #860
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@7756 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Dec 10, 2007
1 parent b3c5f30 commit f5cbf53
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/providers/postgres/qgspostgresprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,9 @@ const QString POSTGRES_DESCRIPTION = "PostgreSQL/PostGIS data provider";
}
PQclear(schema);

if(mSchemaName=="")
mSchemaName=mCurrentSchema;

if (!getGeometryDetails()) // gets srid and geometry type
{
// the table is not a geometry table
Expand Down Expand Up @@ -2515,7 +2518,7 @@ bool QgsPostgresProvider::getGeometryDetails()

PGresult *result = executeDbCommand(connection, sql);

QgsDebugMsg("geometry column query returned " + QString(PQntuples(result)));
QgsDebugMsg("geometry column query returned " + QString::number(PQntuples(result)));
QgsDebugMsg("column number of srid is " + QString::number(PQfnumber(result, "srid")));

if (PQntuples(result) > 0)
Expand Down
2 changes: 1 addition & 1 deletion src/providers/postgres/qgspostgresprovider.h
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ class QgsPostgresProvider:public QgsVectorDataProvider
*/
QString mCurrentSchema;
/**
* SQL statement used to limit the features retreived
* SQL statement used to limit the features retrieved
*/
QString sqlWhereClause;
/**
Expand Down

0 comments on commit f5cbf53

Please sign in to comment.