Skip to content

Commit f203105

Browse files
committed
postgres provider: set length and precision of native floating point types to -1 (fixes #8145)
1 parent e689364 commit f203105

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/core/qgsvectorlayereditbuffer.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,10 @@ bool QgsVectorLayerEditBuffer::commitChanges( QStringList& commitErrors )
412412
}
413413
}
414414
}
415+
else
416+
{
417+
success = false;
418+
}
415419

416420
//
417421
// update geometries

src/providers/postgres/qgspostgresprovider.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,8 @@ QgsPostgresProvider::QgsPostgresProvider( QString const & uri )
164164
<< QgsVectorDataProvider::NativeType( tr( "Decimal number (decimal)" ), "decimal", QVariant::Double, 1, 20, 0, 20 )
165165

166166
// floating point
167-
<< QgsVectorDataProvider::NativeType( tr( "Decimal number (real)" ), "real", QVariant::Double )
168-
<< QgsVectorDataProvider::NativeType( tr( "Decimal number (double)" ), "double precision", QVariant::Double )
167+
<< QgsVectorDataProvider::NativeType( tr( "Decimal number (real)" ), "real", QVariant::Double, -1, -1, -1, -1 )
168+
<< QgsVectorDataProvider::NativeType( tr( "Decimal number (double)" ), "double precision", QVariant::Double, -1, -1, -1, -1 )
169169

170170
// string types
171171
<< QgsVectorDataProvider::NativeType( tr( "Text, fixed length (char)" ), "char", QVariant::String, 1, 255 )

0 commit comments

Comments
 (0)