<div dir="ltr"><div><span style="font-family:arial,sans-serif;font-size:12.727272033691406px">Sorry hit the send button before finishing the text...</span></div><div><span style="font-family:arial,sans-serif;font-size:12.727272033691406px"><br>
</span></div><span style="font-family:arial,sans-serif;font-size:12.727272033691406px">I'm having problems using fields of the type "date" from Postgis in QGIS.</span><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">
<br></div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">CREATE TABLE my_table (</div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">gid serial primary key,</div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">
date_field date,</div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">geom geometry(MultiPolygon,3763)</div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">);</div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">
<br></div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">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:<br></div>
<div style="font-family:arial,sans-serif;font-size:12.727272033691406px"><br></div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px"><blockquote style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex" class="gmail_quote">
Could not commit changes to layer may_table<br>Errors: ERROR: 1 attribute value change(s) not applied.<br>  Provider errors:<br>      PostGIS error while changing attributes: ERROR:  invalid input syntax for type date: ""<br>
    LINE 1: ...my_table" SET "date_field"='' WHERE "...</blockquote>


<p style="margin:0px">  </p>


</div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px"><br></div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px"><br></div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">
It seams that QGIS tries to insert a empty string inside the field instead of a NULL value.<br></div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px"><br></div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">
This happens both in QGIS 2.2 and master<br></div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px"><br></div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">Can anyone confirm this?</div>
<div style="font-family:arial,sans-serif;font-size:12.727272033691406px"><br></div><div style="font-family:arial,sans-serif;font-size:12.727272033691406px">Alexandre Neto</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Mon, Jun 9, 2014 at 4:58 PM, Alexandre Neto <span dir="ltr"><<a href="mailto:senhor.neto@gmail.com" target="_blank">senhor.neto@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">I'm having problems using fields of the type "date" from Postgis in QGIS.<div><br></div><div>CREATE TABLE my_table</div><div><br></div><div><br></div><div>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:</div>

<div><br></div><div><br></div><div><br></div><div><br></div><div> that I cannot row, n</div><div><div><br></div><div><br></div></div></div>
</blockquote></div><br></div>