Re: fieldwidths

From: "Ed L(dot)" <pgsql(at)bluepolka(dot)net>
To: ahoward <ahoward(at)fsl(dot)noaa(dot)gov>, pgsql-general(at)postgresql(dot)org
Subject: Re: fieldwidths
Date: 2003-03-20 23:57:34
Message-ID: 200303201657.34737.pgsql@bluepolka.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Steve Crawford 2003-03-21 00:01:49 Re: system table backup strategy
Previous Message Ed L. 2003-03-20 23:53:35 Re: system table backup strategy