Thread: View the contents of a database

View the contents of a database

From
nuno.barros@fc.ul.pt (Nuno Barros)
Date:
I am a beginner with Postgres and my question is quite simple.
I want to make a query to see the contents of a database, i mean, see
wich tables exist in a database.

All the best
               Nuno Barros

Re: View the contents of a database

From
Ralph Graulich
Date:
> I am a beginner with Postgres and my question is quite simple.
> I want to make a query to see the contents of a database, i mean, see
> wich tables exist in a database.

Within the psql command line client type "\d" (without the quotation
marks).


Kind regards
... Ralph ...



Re: View the contents of a database

From
Richard Huxton
Date:
On Tuesday 06 Aug 2002 11:36 am, Nuno Barros wrote:
> I am a beginner with Postgres and my question is quite simple.
> I want to make a query to see the contents of a database, i mean, see
> wich tables exist in a database.

At the psql prompt use the "\d" command - use "\?" to see other commands
available. Check the manual for full details of psql.

The "\d" command is just a shortcut for standard sql - you can start psql with
a -E flag to see how it does it.

- Richard Huxton