Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Keep numeric fields type, length and precision in postgresql provider
  • Loading branch information
arnaud-morvan committed May 24, 2016
1 parent 3fcd1fd commit 92f71b6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/providers/postgres/qgspostgresprovider.cpp
Expand Up @@ -3336,16 +3336,16 @@ bool QgsPostgresProvider::convertField( QgsField &field, const QMap<QString, QVa
break;

case QVariant::Double:
if ( fieldSize > 18 )
if ( fieldPrec > 0 )
{
fieldType = "numeric";
fieldSize = -1;
}
else
{
fieldType = "float8";
fieldSize = -1;
fieldPrec = -1;
}
fieldPrec = -1;
break;

default:
Expand Down

0 comments on commit 92f71b6

Please sign in to comment.