Search code examples
databasepostgresqlcommandpsqltable-structure

PostgreSQL "DESCRIBE TABLE"


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


Solution

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

    \d+ tablename
    

    See the manual for more info.