[postgis-users] Query for all the polygon tables

Matt Lynch matt at terraEngine.com
Tue Nov 18 13:16:38 PST 2003


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

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?



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

More information about the postgis-users mailing list