I want to check the MAX(LENGTH)
of all VARCHAR
columns of my Redshift table, so I have an idea of a better limitation I could put on the column sizes. (Right now all columns are VARCHAR(65535)
)
I can write a query like:
SELECT MAX(LENGTH(col1)), MAX(LENGTH(col2)), ...
FROM my_table
But isn't there a way I could write my query so it basically says "apply this for every column"? I've tried the answer from this post but it seems it only applies to classic PostgreSQL