How to identify columns that have default values in Redshift

Below is the query to identify all columns (and their default values) that have a default value defined in Redshift database.

select table_schema, table_name, column_name, column_default from information_schema.columns 
where column_default is not null 
and table_schema not in('information_schema', 'pg_catalog') 
order by 1,2,3;
See also  How to copy data from a file in S3 bucket to Redshift tables