Skip to content

Commit

Permalink
Merge pull request #39553 from elpaso/bugfix-gh39530-handle-unknown-t…
Browse files Browse the repository at this point in the history
…ypes-on-old-postgres

PG: Fixes #39530 by handling unknown
  • Loading branch information
elpaso committed Oct 23, 2020
2 parents 42fe8c3 + ac80769 commit 694cc76
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/providers/postgres/qgspostgresprovider.cpp
Expand Up @@ -1146,6 +1146,12 @@ bool QgsPostgresProvider::loadFields()
fieldType = QVariant::String;
fieldSize = -1;
}
else if ( fieldTypeName == QLatin1String( "unknown" ) )
{
// Assume it is convertible to text
fieldType = QVariant::String;
fieldSize = -1;
}
else
{
QgsMessageLog::logMessage( tr( "Field %1 ignored, because of unsupported type %2" ).arg( fieldName, fieldTType ), tr( "PostGIS" ) );
Expand Down

0 comments on commit 694cc76

Please sign in to comment.