Re: simple questions

From: "Oliver Elphick" <olly(at)lfix(dot)co(dot)uk>
To: Niral Trivedi <niral(dot)trivedi(at)insage(dot)com>
Cc: pgsql-general(at)postgresql(dot)org, "'pgsql-admin(at)postgresql(dot)org'" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: simple questions
Date: 2000-12-15 22:00:37
Message-ID: 200012152200.eBFM0dr15350@linda.lfix.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-general

Niral Trivedi wrote:
>All,
>
>I have very simple two questions..
>
>How can we 'describe a table' and 'view all available tables' in postgres
>DB??
>
>I am looking for something similar to 'desc <TABLE>' and 'show tables' in
>MySQL or
>'desc <TABLE>' and 'select * from tab' in Oracle..

In psql:

\d lists all tables
\d table lists all columns in a table

use \? for help on psql commands and \h for help on SQL commands

Start psql with -E to see the SQL queries that \d produces.
--
Oliver Elphick Oliver(dot)Elphick(at)lfix(dot)co(dot)uk
Isle of Wight http://www.lfix.co.uk/oliver
PGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47 6B 7E 39 CC 56 E4 C1 47
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C
========================================
"The fear of the LORD is the instruction of wisdom, and
before honour is humility." Proverbs 15:33

Browse pgsql-admin by date

  From Date Subject
Next Message Niral Trivedi 2000-12-15 22:01:24 RE: simple questions
Previous Message Jie Liang 2000-12-15 21:57:33 Re: simple questions

Browse pgsql-general by date

  From Date Subject
Next Message Niral Trivedi 2000-12-15 22:01:24 RE: simple questions
Previous Message Jie Liang 2000-12-15 21:57:33 Re: simple questions