Skip to content
Permalink
Browse files

Merge pull request #3098 from arnaud-morvan/postgresql_decimal_fields

Keep numeric fields type, length and precision in postgresql provider
  • Loading branch information
jef-n committed May 29, 2016
2 parents c7a4e5a + 92f71b6 commit d6ec868af17359731d9a48b4619702c924151ad2
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 d6ec868

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