[Qgis-user] Problems with date fields from Postgis + QGIS
Ross McDonald
ross at mixedbredie.net
Mon Jun 9 11:49:01 PDT 2014
I found this in the issues list: http://hub.qgis.org/issues/988
Seems to have been around before although there is no fix outlined here.
Ross
On 9 Jun 2014, at 17:12, Alexandre Neto wrote:
> 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 <senhor.neto at gmail.com> 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
> Qgis-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20140609/a5956301/attachment.html>
More information about the Qgis-user
mailing list