With the following query, we can get a list of column names and datatype of a table in PostgreSQL.
Open psql command line and type :
psql
\d+ table_name