<div dir="ltr">Hi <span style="font-family:arial,sans-serif;font-size:13px">Jürgen,</span><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Mar 10, 2014 at 12:30 PM, Jürgen E. <span dir="ltr"><<a href="mailto:jef@norbit.de" target="_blank">jef@norbit.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class=""><br>
</div>QGIS just offers all integer fields as candidate.  It doesn't select any.<br></blockquote><div><br></div><div>If you use add Postgis layer dialog, it uses one of integer fields by default in the primary key column (not always the same).</div>
<div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div class="">I think that changed before 2.0.1. QGIS used to identify which view field are<br></div>
primary keys in the underlying tables, but that makes sense if the view is a<br>
selection of that table, which is just a very small subset of possible views.<br>
E.g. for joins between two tables being a primary key in one of the table,<br>
doesn't mean that the attribute is also unique in the view.<br></blockquote><div><br></div><div>I have a Portuguese user that says that this 2.0.1 is working as before (and that he won't change to 2.2 until it gets "fixed"), but personally I can't confirm this.</div>
<div><br></div><div>What was the downside of the later behavior? I.e. qgis identifying several primary keys and try to guess what to use? Even if it is a small subset of possible views, I think it would make user's life easier in some cases.</div>
<div><br></div><div>Also, as it is now, unless the view only have one integer field, the browser became useless for adding views. We should, at least, change the error message, informing the user that he must select a primary key manually (only possible in the add postgis layer dialog).</div>
<div><br></div><div>Thanks for your answer.</div><div><br></div><div>Alexandre</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<br>
Jürgen<br>
<span class=""><font color="#888888"><br>
--<br>
Jürgen E. Fischer         norBIT GmbH               Tel. +49-4931-918175-31<br>
Dipl.-Inf. (FH)           Rheinstraße 13            Fax. +49-4931-918175-50<br>
Software Engineer         D-26506 Norden               <a href="http://www.norbit.de" target="_blank">http://www.norbit.de</a><br>
QGIS PSC member (RM)      Germany                      IRC: jef on FreeNode<br>
<br>
--<br>
norBIT Gesellschaft fuer Unternehmensberatung und Informationssysteme mbH<br>
Rheinstrasse 13, 26506 Norden<br>
GF: Jelto Buurman, HR: Amtsgericht Emden, HRB 5502<br>
<br>
_______________________________________________<br>
Qgis-developer mailing list<br>
<a href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
</font></span></blockquote></div><br></div></div>