psql: describe table 

Joined:
04/07/2009
Posts:
135

July 12, 2010 18:44:06    Last update: July 12, 2010 18:44:06
Use the \d command to show information about a table:
postgres=# \d patchtype
                 Table "public.patchtype"
   Column    |            Type             |   Modifiers   
-------------+-----------------------------+---------------
 id          | character varying(10)       | not null
 code        | character varying(32)       | not null
 name        | character varying(32)       | 
 suffix      | character varying(32)       | 
 createddate | timestamp without time zone | default now()
Indexes:
    "patchtype_pk" PRIMARY KEY, btree (id)
    "patchtype_code_key" UNIQUE, btree (code)

postgres=# 
Share |
| Comment  | Tags