<div dir="ltr"><div class="gmail_default" style="font-family:monospace,monospace">Hey,<br></div><div class="gmail_default" style="font-family:monospace,monospace">some strange behaviour here (2.6) :<br><br></div><div class="gmail_default" style="font-family:monospace,monospace">In a postgis layer over a postgis view<br></div><div class="gmail_default" style="font-family:monospace,monospace">one of the view field is a boolean<br><br></div><div class="gmail_default" style="font-family:monospace,monospace">I chose the checkbox for editing this field.<br></div><div class="gmail_default" style="font-family:monospace,monospace">checked is "true", unchecked is "false" , without the quote signs.<br></div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace">When adding a new geometry, all works as intended, the row inserted into the database is the correct one.<br><br></div><div class="gmail_default" style="font-family:monospace,monospace">But when trying to get info about the geometry (arrow with the question mark), it generates an error :<br><br>1 cursor states lost.
<p style="margin:0px;text-indent:0px"> SQL: <br></p><p style="margin:0px;text-indent:0px">DECLARE qgis_12 BINARY CURSOR FOR <br></p><p style="margin:0px;text-indent:0px">SELECT st_asbinary("geom",'NDR')</p><p style="margin:0px;text-indent:0px"> ,boolout("positionning_absolute")</p><p style="margin:0px;text-indent:0px"> ,"gid"::text</p><p style="margin:0px;text-indent:0px"> ,"type"::text</p><p style="margin:0px;text-indent:0px"> ,"positionning_offset_type"::text</p><p style="margin:0px;text-indent:0px"> ,"positionning_offset"::text</p><p style="margin:0px;text-indent:0px"> ,"positionning_orientation_type"::text</p><p style="margin:0px;text-indent:0px"> ,"positionning_orientation"::text</p><p style="margin:0px;text-indent:0px"> ,"curv_dist"::text <br></p><p style="margin:0px;text-indent:0px">FROM "street_amp"."editing_street_object" <br></p><p style="margin:0px;text-indent:0px">WHERE boolout("positionning_absolute")='t'</p><p style="margin:0px;text-indent:0px"><br></p>
<p style="margin:0px;text-indent:0px"> Résultat: 7 (</p><p style="margin:0px;text-indent:0px">ERROR: operator does not exist: cstring = unknown</p>
<p style="margin:0px;text-indent:0px"> LINE 1: ...ng_street_object" WHERE boolout("positionning_absolute")='t'</p>
<p style="margin:0px;text-indent:0px"> ^</p>
<p style="margin:0px;text-indent:0px"> HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.</p>
<p style="margin:0px;text-indent:0px"> ) <br></p><p style="margin:0px;text-indent:0px"><br></p><p style="margin:0px;text-indent:0px">I don't understand the need to use the boolout function, <br></p><p style="margin:0px;text-indent:0px">it works simply without it, and if you want to be extra sure, <br></p><p style="margin:0px;text-indent:0px">you could cast the text to boolean safely (it is not necessary tough) <br></p><p style="margin:0px;text-indent:0px"><br></p><p style="margin:0px;text-indent:0px">FROM "street_amp"."editing_street_object" <br></p><p style="margin:0px;text-indent:0px">WHERE "positionning_absolute"='t'::boolean</p><p style="margin:0px;text-indent:0px"><br></p><p style="margin:0px;text-indent:0px">Cheers,</p><p style="margin:0px;text-indent:0px">Rémi-C<br></p><p style="margin:0px;text-indent:0px"><br></p></div></div>