[Qgis-developer] Problem with addAttribute and Postgres default value

Luca Manganelli luca76 at gmail.com
Wed Apr 22 07:15:00 PDT 2015


Hi,

I have a spatial table with an attribute that uses the today's date as
a default value.

Prior to 2.8, for me it was sufficient to call initAttributes with the
number of fields and then populate only the needed fields.

Now in 2.8, QGIS fills all the other fields to NULL value, thus
invalidating the constraint ("date_now field doesn't accept NULL
value").

Is there any way to let QGIS ignore that field and so Postgis can fill
it with the default value?

Thank you in advance


More information about the Qgis-developer mailing list