[Qgis-developer] postgis load error on 0.8

Gavin Macaulay gavin at macaulay.co.nz
Sat Jun 10 17:06:23 EDT 2006


Kirk,

That indeed looks like a bug. Can you submit a bug at svn.qgis.org/trac,
and include the SQL definition of the view in question, as well as the
public.mn_pls_grid table?

Assign the bug to g_j_m (me).

Thanks

Gavin

Kirk R. Wythers wrote:
> I am trying to load a postgis view in a a new build of 0.8 qgis. The
> error returned complains about now column being usable as a unique key.
> The error then goes on to list the columns and give discriptions (very
> useful feature by the way). However, there is a column in the view that
> is unique, and the error message declares that it is suitable. The
> column is 'gid' and is reported in the error message a suitable. Is this
> a bug?
>
> Thanks,
>
> Kirk
>
>
> The view 'publicall_timber_data'has no column suitable for use as a
> unique key.
>
> Qgis requires that the view has a column that can be used as a unique
> key. Such a column should be derived from a table column of type int4
> and be a primary key, have a unique constraint on it, or be a PostgreSQL
> oid column. To improve performance the column should also be indexed.
>
> The view you selected has the following columns, none of which satisfy
> the above conditions:
> 'area' derives from 'public.mn_pls_grid.area' and is not suitable (type
> is numeric and does not have a suitable constraint)
> 'cords' derives from 'public.timber_volume.cords' and is not suitable
> (type is int4 and does not have a suitable constraint)
> 'county_name' derives from 'public.county.county_name' and is not
> suitable (type is varchar and does not have a suitable constraint)
> 'forty_name' derives from 'public.forties.forty_name' and is not
> suitable (type is varchar and does not have a suitable constraint)
> 'gid' derives from 'public.mn_pls_grid.gid' and is suitable.
> 'mbm' derives from 'public.timber_volume.mbm' and is not suitable (type
> is int4 and does not have a suitable constraint)
> 'perimeter' derives from 'public.mn_pls_grid.perimeter' and is not
> suitable (type is numeric and does not have a suitable constraint)
> 'poles' derives from 'public.timber_volume.poles' and is not suitable
> (type is int4 and does not have a suitable constraint)
> 'posts' derives from 'public.timber_volume.posts' and is not suitable
> (type is int4 and does not have a suitable constraint)
> 'range' derives from 'public.mn_pls_grid.range' and is not suitable
> (type is int2 and does not have a suitable constraint)
> 'rdir_name' derives from 'public.rdir.rdir_name' and is not suitable
> (type is varchar and does not have a suitable constraint)
> 'rdir_shortname' derives from 'public.rdir.rdir_shortname' and is not
> suitable (type is varchar and does not have a suitable constraint)
> 'section' derives from 'public.mn_pls_grid.section' and is not suitable
> (type is int2 and does not have a suitable constraint)
> 'the_geom' derives from 'public.mn_pls_grid.the_geom' and is not
> suitable (type is geometry and does not have a suitable constraint)
> 'township' derives from 'public.mn_pls_grid.township' and is not
> suitable (type is int2 and does not have a suitable constraint)
> 'tt_name' derives from 'public.timber_type.tt_name' and is not suitable
> (type is varchar and does not have a suitable constraint)
> 'tt_shortname' derives from 'public.timber_type.tt_shortname' and is not
> suitable (type is varchar and does not have a suitable constraint)
> 'year' derives from 'public.timber_volume.year' and is not suitable
> (type is varchar and does not have a suitable constraint)
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.qgis.org
> http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-developer






More information about the Qgis-developer mailing list