<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
Hi <br><br>I have kind of an ordinary (but still thorny) problem with Qgis (version 1.0.2kore) when I try to load a postgis layer. I'm sorry because there is several posts about this problem but neither of the solutions proposed solve my own problem...<br><br>So, I've got two tables in my postgreSQL database and I create a view from them.<br><br>-- View: calendrier_area<br>CREATE OR REPLACE VIEW calendrier_area AS <br> SELECT calendrier_activite.gid, calendrier_activite.annee, calendrier_activite.mois, calendrier_activite.navire_code, calendrier_activite.zone, ciem_areas.ices_area, ciem_areas.the_geom<br>   FROM calendrier_activite, ciem_areas<br>  WHERE "substring"(calendrier_activite.zone::text, 1, 4) = "substring"(ciem_areas.ices_area::text, 1, 4);<br>ALTER TABLE calendrier_area OWNER TO postgres;<br><br>The attribute "gid" from the table "calendrier_activite" is UNIQUE (I check this with "SELECT DISTINCT * FROM calendrier_area;" and there is as many lines as in table "SELECT * FROM calendrier_area"). Moreover, "gid" type is "serial" so "int4". Therefore, calendrier_area.gid can be considered as a PRIMARY KEY in the view.<br><br>For all that, I can't load this view in Qgis : it still ask me for PRIMARY KEY in the view calendrier_area.<br><br>Do you any idea please ??? Thanks everyone<br><br>Lore<br> <br>                                         <br /><hr />Découvrez toutes les possibilités de communication <a href='http://www.microsoft.com/windows/windowslive/default.aspx' target='_new'>avec vos proches</a></body>
</html>