Using SELECT to get table info.

Started by Paul Ramseyabout 27 years ago3 messagesgeneral
Jump to latest
#1Paul Ramsey
pramsey@cleverelephant.ca

In Oracle, it is possible to get information about a table space by
using a SQL select statement thusly: SELECT * from ALL_TABLES
Is there an equivalent SQL trick in pgsql?
Thanks,
Paul

#2Bob Dusek
bobd@palaver.net
In reply to: Paul Ramsey (#1)
Re: [GENERAL] Using SELECT to get table info.

Hey Paul,

Try doing a \dS from your postgres command prompt.

It lists all the system's tables and - in there somewhere ?? - is all of
the stuff you'll need. I actually spent some time trying to figure
this stuff out once and I found out that postgres keeps a lot of data
that I don't understand. If you want I can send you along a little
memo I wrote to some of the programmers here, at Palaver.

But, some more experienced psql user will probably be able to steer you
more directly at what you're looking for.

Lemme know,

Bob

On Tue, 26 Jan 1999, Paul Ramsey wrote:

Show quoted text

In Oracle, it is possible to get information about a table space by
using a SQL select statement thusly: SELECT * from ALL_TABLES
Is there an equivalent SQL trick in pgsql?
Thanks,
Paul

#3Herouth Maoz
herouth@oumail.openu.ac.il
In reply to: Bob Dusek (#2)
Re: [GENERAL] Using SELECT to get table info.

At 20:56 +0200 on 26/01/1999, Bob Dusek wrote:

But, some more experienced psql user will probably be able to steer you
more directly at what you're looking for.

Basically, do a "man catalogs". This man page gives all the system tables
and their fields. The general table in which to search of tables is
pg_class.

Herouth