<div class="gmail_quote">

<p class="MsoNormal" style="line-height: 150%;"><span style="" lang="EN">Hello everyone,<br>
<br>
</span><span title="">I am trying to insert a shapefile using the icon
"Add PostGIS layer", and when I choose the layer that I want, it
opens perfectly without giving any error.<br>
<br>
</span><span title="">If then I save the project Qgis and exit, and then try to
open the same project, this error message appears:</span></p>

<br>
<br><br><span style="background-color: rgb(255, 255, 204);">2 cursor states lost.
</span><p style="margin: 0px; text-indent: 0px; background-color: rgb(255, 255, 204);">SQL: declare qgisf13 binary cursor for select "gid",asbinary("the_geom",'NDR'),"OBJECTID_1"::text,"Dicofre"::text,"Freguesia"::text,"Municipio"::text,"Distrito_"::text,"Area_EA_Ha"::text,"Area_T_Ha"::text,"TAA"::text,"AREA"::text,"PERIMETER"::text,"OBJECTID"::text,"FREGS01_"::text,"FREGS01_ID"::text,"FRNUM01"::text,"AREA_ha"::text,"Shape_area"::text,"Shape_len"::text from "LIMITES_ADMINISTRATIVOS"."LA_FREGUESIAS_PG"</p>


<p style="margin: 0px; text-indent: 0px; background-color: rgb(255, 255, 204);">Result: 7 (ERROR:  DECLARE CURSOR can only be used in transaction blocks</p>
<p style="margin: 0px; text-indent: 0px; background-color: rgb(255, 255, 204);">)</p><p style="margin: 0px; text-indent: 0px;"><br></p><p style="margin: 0px; text-indent: 0px;">

</p><p class="MsoNormal" style="line-height: 150%;"><span style="" lang="EN">I close the window, and then opens another with another error message:</span><span style="font-family: Calibri;" lang="EN-GB"></span></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; background-color: rgb(255, 255, 204);">1 cursor states lost.
</p><p style="margin: 0px; text-indent: 0px; background-color: rgb(255, 255, 204);">SQL: CLOSE qgisf12</p>
<p style="margin: 0px; text-indent: 0px; background-color: rgb(255, 255, 204);">Result: 7 (ERROR:  cursor "qgisf12" does not exist</p>
<p style="margin: 0px; text-indent: 0px; background-color: rgb(255, 255, 204);">)</p><p style="margin: 0px; text-indent: 0px;"><br></p><p style="margin: 0px; text-indent: 0px;"></p>

<p class="MsoNormal" style="line-height: 150%;"><span style="" lang="EN">This file comes from CAOP 2010 (Portugal), when it was introduced in DB "pgAdmin
III" did not give any error.</span></p>

<p class="MsoNormal" style="line-height: 150%;"><span style="" lang="EN">Does anyone know what this error might be, and how can I fix it?<br>
<br>
</span><span title="">Thanks for the help.</span><span style="font-family: Calibri;" lang="EN-GB"></span></p>

<p style="margin: 0px; text-indent: 0px;"><br></p><p style="margin: 0px; text-indent: 0px;">Orlando<br></p>
 
</div><br>