Search Postgresql Archives

Re: About table schema

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Is there a function interface to get this information
other than from "psql" comman line interface?

Thanks.

Wei

--- Janning Vygen <vygen@gmx.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@postgresql.org



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

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
      joining column's datatypes do not match

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux