Re: About table schema

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Wei Shi <weishisky(at)yahoo(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: About table schema
Date: 2004-05-26 17:28:37
Message-ID: 200405261928.37876.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Wei Shi wrote:
> Hi, does anyone know how to get the schema information
> of a table. More specifically, I would like to know
>
> 1. which field(s) are primary keys?
> 2. the data type of each field of a table?
> 3. If a field is a foreign key, what field/table it
> is referring to.

Use the information schema views.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Frank Finner 2004-05-26 17:46:32 Re: performance very slow
Previous Message pgsql 2004-05-26 17:18:24 Re: Ingres to be released as open source