listing all tables
Ryan Mchale wrote:
Hi,
How would I list all tables in a database?
Ryan
second example in /usr/src/pgsql/src/tutorial/syscat.source
--Gene
How would I list all tables in a database?
You can list all tables with:
select * from pg_class;
but that will give you system tables also.
I think that if you use the \z command in psql, it will give you a list
of all tables in the current database.
Matt
Import Notes
Resolved by subject fallback
On 16 Jul 1998, Ryan Mchale wrote:
Hi,
How would I list all tables in a database?
psql database_name
\dt
Ryan
/-------------------------- signal@shreve.net -----------------------------\
| Brian Feeny | USR TC Hubs | ShreveNet Inc. (318)222-2638 |
| Network Administrator | Perl, Linux | Web hosting, online stores, |
| ShreveNet Inc. | USR Pilot | Dial-Up 14.4-56k, ISDN & LANs |
| 89 CRX DX w/MPFI, lots of |-=*:Quake:*=-| http://www.shreve.net/ |
| mods/Homepage coming soon |LordSignal/SN| Quake server: 208.206.76.47 |
\-------------------------- 318-222-2638 x109 -----------------------------/
On 16-Jul-98 Fandarel wrote:
How would I list all tables in a database?
You can list all tables with:
select * from pg_class;
but that will give you system tables also.
I think that if you use the \z command in psql, it will give you a list
of all tables in the current database.Matt
It's in docs even maybe in FAQs, or in archive - it was already discussed.
+-----------------------------------------------------------------------------+
| ROSTISLAV MATL, student of Masaryk University - Faculty of Informatics |
| e-mail: xmatl@fi.muni.cz WWW: http://www.fi.muni.cz/~xmatl/index.html |
+-----------------------------------------------------------------------------+