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



---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

              http://www.postgresql.org/docs/faq

Reply via email to