Re: How to see the definition of an existing table?

From: missive(at)frontiernet(dot)net (Lee Harr)
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: How to see the definition of an existing table?
Date: 2001-09-18 00:37:46
Message-ID: 9o650p$2c1r$1@news.tht.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Mon, 17 Sep 2001 14:51:52 +0000 (UTC), ke wang <kw68(at)cornell(dot)edu> wrote:
> Is there any command or query to see the definition of an existing table,
> like which is the primary key, which is not null etc.
>

In psql:
\d tablename

to see what the exact query is, start psql with the -E flag:
psql -E
\d tablename

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Kovacs Baldvin 2001-09-18 01:11:49 Re: Checking for table existence
Previous Message Roberto Mello 2001-09-18 00:12:29 Re: Checking for table existence