Hello,

Andreas Neumann claviota:
Hi Joaquim,
QGIS currently only supports int and int4 as a primary key.

On 1/19/11 5:50 PM, Joaquim Condeça wrote:
I'am tring to implement a data model with postgresql.
The table have a primary key composed (VARCHAR) but the QGIS does not recogneize this primary key.

Just a little remark: quite often, I need to map in qgis a table from
postgresql which already has a unique identifier, but a varchar. So I
always add an integer key, as it has been suggested. For example, like this:
   ALTER TABLE tmp_imports ADD COLUMN numauto SERIAL PRIMARY KEY;

But I always "râle" (similar to "complain", typically French attitude,
sorry about that) when doing so, because it adds yet another identifier
to my so-well-designed table, and it does not appear to be very useful,
after all.

I wander why there is a need for an *integer* primary key for qgis,
whereas, in the real world, many unique identifiers are made of
characters. Wouldn'it be possible to make this requirement a bit less
strict, by letting qgis tolerate a varchar primary key?


A+
Pierre

PS: sorry if I double-post. I messed up with replies. (but why is the reply-to not systematically positioned to the list??)
--
____________________________________________________________________________
Pierre Chevalier Géologue EI
   Mesté Duran
   32100 Condom
 Tél+fax  :    09 75 27 45 62
               05 62 28 06 83
                06 37 80 33 64
 Émail  :   pierrechevaliergeolCHEZfree.fr
 icq#   :   10432285
 skype  :   pierre.chevalier1967
 http://pierremariechevalier.free.fr/pierre_chevalier_geologue
____________________________________________________________________________


_______________________________________________
Qgis-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to