PG_TABLE_DEF
To view list of columns of a table and its definitions:
select * from pg_table_def where tablename = 'specify tablename'
This will display all the columns of the table.
It also shows column properties like datatype, encoding , not null constraint, sort key and distribution key.
Comments