Re: User-defined tables - 02-18-2011 , 09:04 AM
good question, one I'd like answered myself!
pg_class has the tables, but has other stuff, too, including system tables something like
select x.* from pg_class x where x.relkind = 'r' and not(x.relname like 'pg_%');
will filter out most of what you don't want;
another way is to join in the pg_authid by pg_class.relowner = pg_authid.oid and then throw out
the rows where pg_authid.rolname is not a role that owns
the tables you're intersted in.