Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-general by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group