[Qgis-user] QGIS 2.10.1 adding PostGIS Views

Bernhard Ströbl bernhard.stroebl at jena.de
Thu Sep 3 22:53:33 PDT 2015



Am 03.09.2015 um 23:41 schrieb Sandro Santilli:
> On Wed, Sep 02, 2015 at 08:48:34AM +0200, Bernhard Ströbl wrote:
>> Am 01.09.2015 um 17:49 schrieb Matthias Kuhn:
>
>
>>> 2. If there are tables without a PK open a second modal dialog with an
>>> explanation of the problem and offer to select a pk from a combobox.
>>
>> I hope you mean "relation" not table, a table should always have a
>> PK.
>
> It's not mandatory for a table to have a PK.
> I guess by "tables without a PK" he means table for which no PRIMARY
> KEY constraint is explicitly defined (should an UNIQUE key be
> considered equally valid?).
>

It is not mandatory, of course, that's why I wrote "should", but IMHO it 
is very bad database design to not define one.
There might be several UNIQUE constraints on one table but there can be 
only one PK constraint. So in case of only a UINIQUE constraint the 
table would be handled as any other without PK constraint (or QGIS needs 
to analyse how many fields have a UNIQUE constraint).

Bernhard


__________ Information from ESET Mail Security, version of virus signature database 12200 (20150904) __________

The message was checked by ESET Mail Security.
http://www.eset.com





More information about the Qgis-user mailing list