Re: column names, types, properties for a table - Mailing list pgsql-sql

From thomas.silvi
Subject Re: column names, types, properties for a table
Date
Msg-id 4320A11E.30502@laposte.net
Whole thread Raw
In response to column names, types, properties for a table  (Roger Tannous <roger77_lb@yahoo.com>)
List pgsql-sql
          Hello,   there is the view "columns" in the schema "information_schema" that 
can give you most of the informations you need   ( for PosgreSQL version >= 7.4.8 if I'm right).
   SELECT   *   FROM     information_schema.columns   WHERE    table_name = 'mytable';
   See 
http://www.postgresql.org/docs/8.0/interactive/infoschema-columns.html#AEN26185     or  
http://www.postgresql.org/docs/8.0/static/infoschema-columns.html#AEN26185
      Regards,            Thomas

Roger Tannous a écrit :

>Hi, 
>
>Is it possible to issue an SQL query that lists column names, types (int,
>varchar, boolean, etc.), properties (like NOT NULL or UNIQUE) 
>for a given table name ?
>
>
>Regards,
>Roger Tannous.
>
>__________________________________________________
>Do You Yahoo!?
>Tired of spam?  Yahoo! Mail has the best spam protection around 
>http://mail.yahoo.com 
>
>---------------------------(end of broadcast)---------------------------
>TIP 2: Don't 'kill -9' the postmaster
>
>  
>



pgsql-sql by date:

Previous
From: Michael Fuhr
Date:
Subject: Re: Statistics from Sequences
Next
From: Joÿffffffffffe3o Carvalho
Date:
Subject: Re: Statistics from Sequences