| From: | Lamar Owen <lamar(dot)owen(at)wgcr(dot)org> | 
|---|---|
| To: | Luiz Antonio <luiz(at)supersoft(dot)com(dot)br> | 
| Cc: | pgsql-general(at)postgresql(dot)org | 
| Subject: | Re: Show tables! | 
| Date: | 2000-06-23 15:44:22 | 
| Message-ID: | 395385D6.F64DB16D@wgcr.org | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-general | 
Luiz Antonio wrote:
> 
> Hi people!!!
> Does anybody know how I can execute a comand as the comand show tables that
> exist in teh MySQL database?
> Does exist some comand that show all tables of a database???
> If somebody can help me...thanks!!!
\dt in psql.
The SQL to do this:
SELECT relname FROM pg_class WHERE relkind='r';
This will give you all tables in the system, including system catalogs.
If you don't want system catalogs, pgaccess stuff, and pgadmin stuff,
then:
SELECT relname FROM pg_class
	WHERE relkind='r'
	and relname !~ '^pg_'
	and relname !~ '^pga_'
	and relname !~ '^pgadmin_';
--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2000-06-23 16:00:31 | Re: followup to SELECT/INSERT problem | 
| Previous Message | kaiq | 2000-06-23 15:34:37 | Re: app-index in www.pgsql.com |