[Qgis-user] [Possible bug] Qgis treating uuid as text in db views
Rémi Desgrange
Remi.Desgrange at fibrea.net
Wed Sep 19 07:09:16 PDT 2018
Thanks. Already tried that, but didn’t work ☹
I think that the real question here is: why Qgis think that my column is text and not uuid? (it try to make ILIKE on the uuid it doesn’t make sense)
Sincerly, Rémi Desgrange
Le 19/09/2018 15:34, « Qgis-user au nom de Karl Magnus Jönsson » <qgis-user-bounces at lists.osgeo.org au nom de Karl-Magnus.Jonsson at kristianstad.se> a écrit :
Hi.
I think I've done something similar. Not against a view though. I had to set the default value for the filed in the form to uuid() to make it work properly. Worth a try.
Karl-Magnus Jönsson
-----Ursprungligt meddelande-----
Från: Qgis-user [mailto:qgis-user-bounces at lists.osgeo.org] För Bernhard Ströbl
Skickat: den 19 september 2018 15:23
Till: qgis-user at lists.osgeo.org
Ämne: Re: [Qgis-user] [Possible bug] Qgis treating uuid as text in db views
Am 19.09.2018 um 11:26 schrieb Rémi Desgrange:
> Hi,
>
> I have some database view used in qgis. (from postgresql 10, postgis2.4). Since some time now (I posted a bug report 3 months ago here: https://issues.qgis.org/issues/19180) This was about errors in my DBs log about selection request that does not end well. But, at this time it was not a problem for the end user. Yesterday, we spotted a much more problematic error. Here is the story:
>
> We wanted to cut a linestring, so we use the tool “Split Features”. And when we did that. It cut the linestring, so changing the geometry of the linestring (updating) and trying to create a new one with the other part. The problem is: it updated correctly the existing feature, but did _not_ save the other one (it created it in qgis though).
Was there any error message from the DB?
> The reason behind this is qgis treating an uuid like a text field. So, when treating uuid as text, when it tries to create a new feature out of the old one split, it put the value <old_uuid>_1 which cannot work obviously.
It is the user's obligation to fill meaningful values in fields. This is
e.g. also true for integer primary key fields: if you fill in a value
already present or no value at all the changes cannot be saved.
I would create an insert trigger on the DB that creates a uuid for any
insert request.
Hope this hleps
Bernhard
>
> This is not a problem with form or style, the field as the type uuid in qgis, I “mapped” uuid generator on it, and tried text editor too.
>
>
> I don’t know if it’s us that don’t know how to properly configure Qgis or if it’s a bug…
>
>
> Cordialement, Rémi Desgrange
>
>
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>
__________ Information from ESET Mail Security, version of virus signature database 18077 (20180919) __________
The message was checked by ESET Mail Security.
http://www.eset.com
_______________________________________________
Qgis-user mailing list
Qgis-user at lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
_______________________________________________
Qgis-user mailing list
Qgis-user at lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
More information about the Qgis-user
mailing list