[Qgis-user] Can't edit postgres table more then once.

Mofo Yoda mofoyoda at gmail.com
Mon Jan 26 04:08:48 PST 2015


George, thanks for your advice. After testing on a brand new table, I've figured out that this problem appears only with tables, that don’t have a primary key constraint in the db. When I add a primary key, my edits get committed to the base as expected. 
However, I’ve noticed that “Add PostGIS Table” dialog doesn’t show this table has a primary key (the "Primary key" column is empty). But when a table is added to the map, it has a key=“gid” option in "Layer source” field in “Properties" - “General" window. 

Can anyone confirm the same issue is only when editing a table without primary key?

> On 26 Jan 2015, at 05:15, George Silva <georger.silva at gmail.com> wrote:
> 
> Weird. I'll try to reproduce.
> 
> Doesnt seem like something that would slip by.
> 
> Can you test again on a brand new table without any triggers or postgresql magic behind?
> 
> Em 25/01/2015 23:15, "Mofo Yoda" <mofoyoda at gmail.com <mailto:mofoyoda at gmail.com>> escreveu:
> Hi list,
> 
> I have a non-spatial postgres table in my QGIS project which I want to edit in attribute table window. When I open it, first time when I change any attribute value and hit "Save Edits” button, the data is updated in the DB and updated in QGIS attribute table window. But when I try to edit an attribute of the same record the second time, when I hit save nothing is updated in the db. But the attribute table shows new values. Stopping and starting new editing session doesn’t help. The only thing that helps is closing the attribute table window and reopening it again. Then I can edit the value once again, but only one time.
> PostGIS log window in QGIS is clean, I get no errors when hitting “Save Edits”. I’m on version 2.6.0.
> Does anyone have the same bug?
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org <mailto:Qgis-user at lists.osgeo.org>
> http://lists.osgeo.org/mailman/listinfo/qgis-user <http://lists.osgeo.org/mailman/listinfo/qgis-user>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20150126/670f928e/attachment.html>


More information about the Qgis-user mailing list