[Qgis-community-team] Possible error in documentation: postgis id can now be int8 (qint64)

Luca Arzeni l.arzeni at iname.com
Thu Nov 14 09:33:16 PST 2013


Hi,
I,m reading the user guide related to vector layer with postgis.

At the URL:

http://www.qgis.org/en/docs/user_manual/working_with_vector/supported_data.html#postgis-layers

in the paragraph:

Some details about PostgreSQL layers

the user guide states that:

"QGIS requires that PostgreSQL layers contain a column that can be used as a unique key for the layer. For tables this usually means that the table needs a primary key, or a column with a unique constraint on it. In QGIS, this column needs to be of type int4 (an integer of size 4 bytes). "

Now, looking at ticket #62, there was a path that fixes this issue, extending the id field to use a qint64.
Looking at file python/core/conversion.sip, it seems that the patch was already applied to qgis.
In my understanding, qint64 maps to a postgres int8 field, which is the "native" integer type of a 64bit architecture. So the docs should be updated this way:

"QGIS requires that PostgreSQL layers contain a column that can be used as a unique key for the layer. For tables this usually means that the table needs a primary key, or a column with a unique constraint on it. In QGIS, this column needs to be of type integer which on 32bit architecture con be an int4 while under 64bit architecture can be an int8 (an integer of size of maximum 8 bytes). As of release 2.0 Dufour, postgres primary keys of non integer type are still not supported as postgis id fields."

Please, if this correction is accepted, forward the note to the development team to close/correct the ticket #62.

Thanks, larzeni




More information about the Qgis-community-team mailing list