parsing relname in pg_class - Mailing list pgsql-general

From Johnson, Shaunn
Subject parsing relname in pg_class
Date
Msg-id 73309C2FDD95D11192E60008C7B1D5BB0452E17D@snt452.corp.bcbsm.com
Whole thread Raw
Responses Re: parsing relname in pg_class
Re: parsing relname in pg_class
List pgsql-general
Howdy:  
  
Running Postgres 7.1.3 on RedHat 7.2 kernel 2.4.7 rel. 10.  
 
I'm writing a perl script where I only want to parse
out a list of tables from the database I'm connecting
to.
 
I'm doing something like this:
 
[snip]
 
select relname from pg_class
where relname not like '%_i%';
 
[/snip]
 
And that will get me halfway, but I still get a list
of tables with numbers attached and primary keys and the
like (for instance, what is pg_toast?)
 
Is there an easier way to get a list of the tables ONLY
with a select statement?  I don't think I can pass a "\d"
as a variable and get a return and I don't want to make
a case statement for every possibility.
 
PS: If this comes through as a MIME-type email, let me know -
I'm trying to stop that (using M$ Outlook '97).
Thanks!
 
-X
 

pgsql-general by date:

Previous
From: "David Esposito"
Date:
Subject: Re: Core dump on PG 7.1.3
Next
From: Bruno Wolff III
Date:
Subject: Blocking object creation for some users