diff --git a/src/providers/postgres/qgspostgresprovider.cpp b/src/providers/postgres/qgspostgresprovider.cpp index 8285938147f..368aba8d081 100644 --- a/src/providers/postgres/qgspostgresprovider.cpp +++ b/src/providers/postgres/qgspostgresprovider.cpp @@ -632,6 +632,15 @@ QString QgsPostgresProvider::endianString() } } + +struct PGTypeInfo +{ + QString typeName; + QString typeType; + QString typeElem; + int typeLen; +}; + bool QgsPostgresProvider::loadFields() { if ( !mIsQuery ) @@ -660,14 +669,6 @@ bool QgsPostgresProvider::loadFields() sql = "SELECT oid,typname,typtype,typelem,typlen FROM pg_type"; QgsPostgresResult typeResult = connectionRO()->PQexec( sql ); - struct PGTypeInfo - { - QString typeName; - QString typeType; - QString typeElem; - int typeLen; - }; - QMap typeMap; for ( int i = 0; i < typeResult.PQntuples(); ++i ) {