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

Re: About table schema

From: Wei Shi <weishisky(at)yahoo(dot)com>
To: Janning Vygen <vygen(at)gmx(dot)de>, pgsql-general(at)postgresql(dot)org
Subject: Re: About table schema
Date: 2004-05-26 01:46:03
Message-ID: 20040526014603.86866.qmail@web60307.mail.yahoo.com (view raw or flat)
Thread:
Lists: pgsql-general
Is there a function interface to get this information
other than from "psql" comman line interface?

Thanks.

Wei

--- Janning Vygen <vygen(at)gmx(dot)de> wrote:
> Am Mittwoch, 26. Mai 2004 00:36 schrieb Wei Shi:
> > 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.
> 
> connect to your database with 'psql' and type
> 
> \d tablename
> 
> which gives you all information you asked for. Type
> \? for a list of other 
> commands within psql and take a look at 'man psql'
> 
> kind regards,
> janning
> 
> ---------------------------(end of
> broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to
majordomo(at)postgresql(dot)org



	
		
__________________________________
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 

In response to

Responses

pgsql-general by date

Next:From: Mike MascariDate: 2004-05-26 02:31:20
Subject: Re: About table schema
Previous:From: Tom AllisonDate: 2004-05-26 01:31:11
Subject: Re: timestamps

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