[postgis-users] QGIS requires

William Furnass will at thearete.co.uk
Wed Aug 18 10:51:41 PDT 2010


Hi,

QGIS requires that all PostGIS tables/views have a numeric primary
key.  As a result I have had to create many temporary tables solely
for the purpose of viewing the results of queries when ideally I would
have liked to create views from the majority of my queries.  Does
anyone know if I can create on-the-fly a serial numeric column in
queries/views to save me having to create so many temporary tables?
It'd be grand if something like the following were possible:

CREATE VIEW my_view AS (SELECT numeric_id_generator(),
St_Union(wkb_geometry) FROM my_subregions GROUP BY region_id);

Cheers,

Will



More information about the postgis-users mailing list