On Thursday March 20 2003 4:01, ahoward wrote:
> postgresql'rs-
>
> i've looked through to docs a bit, but have not found a way to quickly
> calculate the maximum fieldwidth of each field in a tuple set.
For varchars...
select max(char_length(trim(trailing ' ' from mycolumn))) from relation
or maybe
select max(char_length(trim(both ' ' from mycolumn))) from relation
?
Ed