[postgis-users] Query for all the polygon tables

Paul Ramsey pramsey at refractions.net
Tue Nov 18 13:39:47 PST 2003


If you manage your columns carefully using addgeometrycolumn and 
dropgeometrycolumn, you should be able to do this with a trivial query 
against GEOMETRY_COLUMNS.

Paul

Matt Lynch wrote:

> Hi,
> 
> I would like to be able to query for all the polygon tables in a
> specific postgis database.
> 
> I dug around on the net and figured out how to find all the tables, that
> is 
> 
> SELECT c.relname, 'table'::text, u.usename FROM pg_class c,pg_user u
> WHERE c.relowner = u.usesysid AND c.relkind='r' AND NOT EXISTS (SELECT 1
> FROM pg_views WHERE viewname=c.relname) AND c.relname !~ '^pg_';
> 
> Now I need some help to restrict to the polygon tables.
> 
> Any suggestions?
> 
> Thanks,
> 
> Matt
> 
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.532 / Virus Database: 326 - Release Date: 10/27/2003
>  
> 
> 
> 
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users


-- 
       __
      /
      | Paul Ramsey
      | Refractions Research
      | Email: pramsey at refractions.net
      | Phone: (250) 885-0632
      \_




More information about the postgis-users mailing list