Skip to content


put out a warning message when accessible postgis cannot be determined
Browse files Browse the repository at this point in the history
git-svn-id: c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Mar 27, 2008
1 parent 6440138 commit acb2f35
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/app/qgsdbsourceselect.cpp
Expand Up @@ -536,13 +536,21 @@ bool QgsDbSourceSelect::getTableInfo(PGconn *pg, bool searchGeometryColumnsOnly,
PGresult *result = PQexec(pg, sql.toUtf8());
if (result)
if( PQntuples(result)==0 )
if( PQresultStatus(result) != PGRES_TUPLES_OK)
tr("Accessible tables could not be determined"),
QString ( tr("Database connection was successful, but the accessible tables could not be determined.\n\n"
"The error message from the database was:\n%1\n" ) )
.arg( QString::fromUtf8(PQresultErrorMessage(result)) ) );
else if( PQntuples(result)==0 )
QMessageBox::warning(this, tr("No accessible tables found"),
("Database connection was successful, but no accessible tables were found.\n\n"
"Please verify that you have SELECT privilege on a PostGIS' geometry_columns\n"
"table and at least one table carrying PostGIS geometry."));
"Please verify that you have SELECT privilege on a table carrying PostGIS\n"
Expand Down

0 comments on commit acb2f35

Please sign in to comment.