Skip to content
Permalink
Browse files

fix postgres error messages

git-svn-id: http://svn.osgeo.org/qgis/trunk@11992 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef
jef committed Nov 7, 2009
1 parent 3b3ca67 commit d5ef557773c108cf3c801c76031bad32d03bc6d5
Showing with 8 additions and 6 deletions.
  1. +8 −6 src/providers/postgres/qgspostgresprovider.cpp
@@ -104,9 +104,10 @@ QgsPostgresProvider::QgsPostgresProvider( QString const & uri )
if ( PQresultStatus( testAccess ) != PGRES_TUPLES_OK )
{
showMessageBox( tr( "Unable to access relation" ),
tr( "Unable to access the %1 relation.\n" ).arg( mSchemaTableName )
+ tr( "The error message from the database was:\n%1.\nSQL: %2" )
.arg( QString::fromUtf8( PQresultErrorMessage( testAccess ) ).arg( sql ) ) );
tr( "Unable to access the %1 relation.\nThe error message from the database was:\n%2.\nSQL: %3" )
.arg( mSchemaTableName )
.arg( QString::fromUtf8( PQresultErrorMessage( testAccess ) ) )
.arg( sql ) );
valid = false;
disconnectDb();
return;
@@ -123,9 +124,10 @@ QgsPostgresProvider::QgsPostgresProvider( QString const & uri )
if ( PQresultStatus( testAccess ) != PGRES_TUPLES_OK )
{
showMessageBox( tr( "Unable to access relation" ),
tr( "Unable to determine table access privileges for the %1 relation.\n" ).arg( mSchemaTableName )
+ tr( "The error message from the database was:\n%1.\nSQL: %2" )
.arg( QString::fromUtf8( PQresultErrorMessage( testAccess ) ) ).arg( sql ) );
tr( "Unable to determine table access privileges for the %1 relation.\nThe error message from the database was:\n%2.\nSQL: %3" )
.arg( mSchemaTableName )
.arg( QString::fromUtf8( PQresultErrorMessage( testAccess ) ) )
.arg( sql ) );
valid = false;
disconnectDb();
return;

0 comments on commit d5ef557

Please sign in to comment.
You can’t perform that action at this time.