[postgis-users] change column type in view

Dale Rudrum dale.rudrum at gmail.com
Wed Aug 29 06:54:30 PDT 2012

To have an easy and quick acces to the various projects we have had over
the years I would like to have a table with in it polygons representing the
areas in which work was done. It seems to me that a view would be easiest
as this is updated automatically. I came up with this script:
CREATE OR REPLACE VIEW project_overview AS
SELECT geometry_columns.f_table_name AS table,
geometry_columns.f_geometry_column AS geometrycol,
st_estimated_extent('public', geometry_columns.f_table_name,
geometry_columns.f_geometry_column) AS extent
FROM geometry_columns
WHERE geometry_columns.f_table_name::text <> 'project_overview';
which works fine, save that the type of the column extent is not geometry.
Therefore autocad and quantum GIS cannot acces the information
Is there a way to change this in the definition of the view, or to bypass
the problem by using a second view? As a newby I'm stuck at this point.
Also suggestions for different setups solving my problem would be
appreciated. Because of our use of autocad we are restricted to PostGIS 1.5
on postgres 9.0.
Dale Rudrum
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20120829/633aa893/attachment.html>

More information about the postgis-users mailing list