On Tue, Oct 11, 2016 at 12:40:21PM +0200, Even Rouault wrote:
> Le mardi 11 octobre 2016 12:17:44, Sandro Santilli a écrit :

> > Then I think the OGR provider should just avoid setting OFTReal fields
> > length/precision values, upon reading (but also upon writing, as long
> > as the QgsField length/precision for Double-typed fields would not be
> > defined).
> > 
> > Does it make sense ?
> On reading, should be hopefully rather harmless.

Not if QgsField length/precision semantics have a defined meaning
of "not-to-be-used-for-Double-types". Harmless if the defined meaning
is "informative only, non-constraining". This is still an open

> On writing, looking quickly at the provider, I couldn't see where 
> OGR_Fld_SetWidth()/Precision would be called with a non-zero value on a 
> OFTReal field if QgsField length/precision is not set

There's a convertField function but indeed doesn't seem to be
affecting the writing to OGR output. So this bug is fully within
PostgreSQL provider making use of what should have only been
informative QgsField len/precision.

Qgis-developer mailing list
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to