Skip to content
Permalink
Browse files

Keep numeric fields type, length and precision in postgresql provider

  • Loading branch information
arnaud-morvan committed May 24, 2016
1 parent 3fcd1fd commit 92f71b696ca93c792ae5602ed82863fcef0e5006
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/providers/postgres/qgspostgresprovider.cpp
@@ -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:

0 comments on commit 92f71b6

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