[Qgis-user] Adding PostGIS views to the map
Jürgen E. Fischer
jef at norbit.de
Wed Apr 17 09:36:47 PDT 2013
Hi Lee,
On Wed, 17. Apr 2013 at 12:14:01 -0400, Lee Hachadoorian wrote:
> As I recall, QGIS used to treat any unique int field as a suitable key for
> adding a layer, so that views that were registered in the PostGIS
> geometry_columns table could be added to the map. Now that geometry_columns
> is a view rather than a table, spatial views are registered automatically.
> They appear in the tables list in QGIS, but the primary key has to be
> selected manually (even if they underlying table column is a suitable primary
> key). Perhaps I am misremembering that this step was necessary previously,
> but I wonder if there is any way to avoid it, e.g. by making sure the key
> column has a specific name, data type, etc?
There's no specific name or data type required for a key column and a view is
also not required to have just one (or any) underlying tables - so guessing
which column might be a unique is not that easy.
Jürgen
--
Jürgen E. Fischer norBIT GmbH Tel. +49-4931-918175-31
Dipl.-Inf. (FH) Rheinstraße 13 Fax. +49-4931-918175-50
Software Engineer D-26506 Norden http://www.norbit.de
committ(ed|ing) to Quantum GIS IRC: jef on FreeNode
--
norBIT Gesellschaft fuer Unternehmensberatung und Informationssysteme mbH
Rheinstrasse 13, 26506 Norden
GF: Jelto Buurman, HR: Amtsgericht Emden, HRB 5502
More information about the Qgis-user
mailing list