Skip to content

Commit 92f71b6

Browse files
committed
Keep numeric fields type, length and precision in postgresql provider
1 parent 3fcd1fd commit 92f71b6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/providers/postgres/qgspostgresprovider.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -3336,16 +3336,16 @@ bool QgsPostgresProvider::convertField( QgsField &field, const QMap<QString, QVa
33363336
break;
33373337

33383338
case QVariant::Double:
3339-
if ( fieldSize > 18 )
3339+
if ( fieldPrec > 0 )
33403340
{
33413341
fieldType = "numeric";
3342-
fieldSize = -1;
33433342
}
33443343
else
33453344
{
33463345
fieldType = "float8";
3346+
fieldSize = -1;
3347+
fieldPrec = -1;
33473348
}
3348-
fieldPrec = -1;
33493349
break;
33503350

33513351
default:

0 commit comments

Comments
 (0)