Adding Arnaud to the loop, being the author of the PR which added
constrained numeric fields in PostgreSQL provider 
Arnaud: what was the reason for constraining that field ?
The semantic of QgsField's length and precision attributes
aren't fully defined and they seem not to match PostgreSQL
numeric relatives "precision" and "scale" 
On Tue, Oct 11, 2016 at 10:51:34AM +0200, Sandro Santilli wrote:
> On Tue, Oct 11, 2016 at 10:47:50AM +0200, Paolo Cavallini wrote:
> > Il 11 ottobre 2016 10:45:18 CEST, Sandro Santilli <s...@kbt.io> ha scritto:
> > >Does anyone have an idea about how should QgsField::length be
> > >interpreted ?
> > Isn't it related to the comma being counted in real fields?
> The bug ? Probably. QgsOgrProvider::convertField adds one byte
> for the comma while QgsPostgresProvider::convertField does not
> But what I'd like to know is whether or not QgsField::length
> is supposed to count or not the comma (or what else is meant
> to be expressing) for a QVariant::Double and for other types.
> Qgis-developer mailing list
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Qgis-developer mailing list
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer