this sql will return all tables name in your database;
select usename, relname, relkind, relhasrules, from pg_class, pg_user where usesysid=relowner and
(relkind =’r’ or relkind=’i’ or relkind=’s’) and relname !~’^pg_’ and
(relkind !=’i’ or relname !~’^xinx’) order by relname;
this sql has been tested on windows xp pro with postgresql 8 on it.
i use this sql when i was trying to develop ad-hoc report system.