1

I noticed in QGIS Server 2.18.3 and using QGIS Desktop 2.18.3 client the following:

I have a postgis table with a date field called "fecha_inst".

A user is updating the table using WFS-T protocol from outside our network.

  1. When de user updates a feature and does not fill this "fecha_inst" date field, the field remains null and there is no problem.

  2. After this the user fills the field (with the date QGIS Widget) and it is updated in the DB ok.

  3. But after this, when the field is already filled and the user deletes its content and saves, when the QGIS Server converts the HTTP package to SQL UPDATE query, it sets "fecha_inst"='' instead of "feach_inst"=NULL. This raises the following error in the BD which is shown also in QGIS:

    "PostGIS error while changing attributes: ERROR: invalid input syntax for date: <<>>"

I created an issue in QGIS Application issues repository: http://hub.qgis.org/issues/16125

I created a trigger before update on the table that sets the date to NULL when the value is ='09/09/1999' and told the user to insert this date when he wants to delete the date. This is very ugly...

Anyone has any other workaround to this problem?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.