Re: fieldwidths - Mailing list pgsql-general

From Ed L.
Subject Re: fieldwidths
Date
Msg-id 200303201657.34737.pgsql@bluepolka.net
Whole thread Raw
In response to fieldwidths  (ahoward <ahoward@fsl.noaa.gov>)
Responses Re: fieldwidths  (ahoward <ahoward@fsl.noaa.gov>)
List pgsql-general
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


pgsql-general by date:

Previous
From: "Ed L."
Date:
Subject: Re: system table backup strategy
Next
From: Steve Crawford
Date:
Subject: Re: system table backup strategy