PostgreSQL "DESCRIBE TABLE"

Mr. Muskrat picture Mr. Muskrat · Sep 20, 2008 · Viewed 1.2M times · Source

How do you perform the equivalent of Oracle's DESCRIBE TABLE in PostgreSQL (using the psql command)?

Answer

Chris Bunch picture Chris Bunch · Sep 20, 2008

Try this (in the psql command-line tool):

\d+ tablename

See the manual for more info.