How can I find the longest record (in characters) for each column in a table in PostgreSQL
The below worked for what I needed:

SELECT
        MAX(char_length(column1)) as column1,
        MAX(char_length(column2)) as column2
FROM
        schema.table