Sorry hit the send button before finishing the text...

I'm having problems using fields of the type "date" from Postgis in QGIS.

CREATE TABLE my_table (
gid serial primary key,
date_field date,
geom geometry(MultiPolygon,3763)
);

The field don't have any NOT NULL constraint, but when I try to update a
row leaving that field empty, I got and error saying:

Could not commit changes to layer may_table
> Errors: ERROR: 1 attribute value change(s) not applied.
> Provider errors:
> PostGIS error while changing attributes: ERROR: invalid input syntax for
> type date: ""
> LINE 1: ...my_table" SET "date_field"='' WHERE "...



It seams that QGIS tries to insert a empty string inside the field instead
of a NULL value.

This happens both in QGIS 2.2 and master

Can anyone confirm this?

Alexandre Neto


On Mon, Jun 9, 2014 at 4:58 PM, Alexandre Neto <[email protected]>
wrote:

> I'm having problems using fields of the type "date" from Postgis in QGIS.
>
> CREATE TABLE my_table
>
>
> The field don't have any NOT NULL constraint, but when I try to update a
> row leaving that filed empty, I got and error saying:
>
>
>
>
>  that I cannot row, n
>
>
>
_______________________________________________
Qgis-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to