dbTalk Databases Forums  

Re: User-defined tables

comp.databases.postgresql.sql comp.databases.postgresql.sql


Discuss Re: User-defined tables in the comp.databases.postgresql.sql forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
David Briggs
 
Posts: n/a

Default 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.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.