[Qgis-developer] 2.6 strange behaviour with editing boolean field using checkbox + postgis
Denis Rouzaud
denis.rouzaud at gmail.com
Fri Aug 28 06:20:42 PDT 2015
Note sure for te technical details, but instead of true/false, I have t
and f as checked and unchecked values.
On 08/28/2015 03:11 PM, Rémi Cura wrote:
> Hey,
> some strange behaviour here (2.6) :
>
> In a postgis layer over a postgis view
> one of the view field is a boolean
>
> I chose the checkbox for editing this field.
> checked is "true", unchecked is "false" , without the quote signs.
>
> When adding a new geometry, all works as intended, the row inserted
> into the database is the correct one.
>
> But when trying to get info about the geometry (arrow with the
> question mark), it generates an error :
>
> 1 cursor states lost.
>
> SQL:
>
> DECLARE qgis_12 BINARY CURSOR FOR
>
> SELECT st_asbinary("geom",'NDR')
>
> ,boolout("positionning_absolute")
>
> ,"gid"::text
>
> ,"type"::text
>
> ,"positionning_offset_type"::text
>
> ,"positionning_offset"::text
>
> ,"positionning_orientation_type"::text
>
> ,"positionning_orientation"::text
>
> ,"curv_dist"::text
>
> FROM "street_amp"."editing_street_object"
>
> WHERE boolout("positionning_absolute")='t'
>
>
> Résultat: 7 (
>
> ERROR: operator does not exist: cstring = unknown
>
> LINE 1: ...ng_street_object" WHERE boolout("positionning_absolute")='t'
>
> ^
>
> HINT: No operator matches the given name and argument type(s). You
> might need to add explicit type casts.
>
> )
>
>
> I don't understand the need to use the boolout function,
>
> it works simply without it, and if you want to be extra sure,
>
> you could cast the text to boolean safely (it is not necessary tough)
>
>
> FROM "street_amp"."editing_street_object"
>
> WHERE "positionning_absolute"='t'::boolean
>
>
> Cheers,
>
> Rémi-C
>
>
>
>
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20150828/db837ff2/attachment.html>
More information about the Qgis-developer
mailing list