Re: view database, tables, columns

From: "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: view database, tables, columns
Date: 2008-01-27 09:54:25
Message-ID: 20080127095425.GA10885@a-kretschmer.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

am Sun, dem 27.01.2008, um 9:24:57 +0000 mailte e-letter folgendes:
> Readers,
>
> I've created a database. I couldn't find any documentation to help me
> with the following questions.
>
> How do I see a list of the names of databases that I've created?
> How do I see the name of the table(s) of a database?
> How do I see the names of columns within a table?
>
> I can see the information using the program pgadmin 3, but I want to
> learn how to see this information from the command terminal.

Start the command-terminal, psql, and read:

Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit

Try this commands, and special for your questions:

list of databases: \l
list of tables: \d
list of columns within a table: \d <table>

Andreas
--
Andreas Kretschmer
Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message sdger erger 2008-01-28 01:07:24 2Q: Vacuuming and making queries case insensitive
Previous Message e-letter 2008-01-27 09:24:57 view database, tables, columns