Showing with 2 additions and 2 deletions.
  1. BIN resources/srs.db
  2. +2 −2 src/providers/postgres/qgspostgresprovider.cpp
Binary file modified resources/srs.db
Binary file not shown.
4 changes: 2 additions & 2 deletions src/providers/postgres/qgspostgresprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4029,7 +4029,7 @@ bool QgsPostgresProvider::getGeometryDetails()
QgsDebugMsg( "Getting geometry column: " + sql );
result = connectionRO->PQexec( sql );

QgsDebugMsg( "geometry column query returned " + QString::number( PQntuples( result ) ) );
QgsDebugMsg( QString( "geometry column query returned %1 rows" ).arg( PQntuples( result ) ) );

if ( PQntuples( result ) > 0 )
{
Expand Down Expand Up @@ -4117,7 +4117,7 @@ bool QgsPostgresProvider::getGeometryDetails()

result = connectionRO->PQexec( sql );

if ( PQntuples( result ) == 1 )
if ( PQntuples( result ) == 1 && !PQgetisnull( result, 0, 0 ) )
{
fType = QString::fromUtf8( PQgetvalue( result, 0, 0 ) );
}
Expand Down