fieldwidths - Mailing list pgsql-general

From ahoward
Subject fieldwidths
Date
Msg-id Pine.LNX.4.53.0303202256490.21937@eli.fsl.noaa.gov
Whole thread Raw
Responses Re: fieldwidths  ("Ed L." <pgsql@bluepolka.net>)
Re: fieldwidths  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general

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.  i'd like to be
able to do something like :

  select field_widths(*) from relation;

where 'field_width' means the width as printed out by the default to_char()
method.

obviously psql does something internally to do it's formatting, but whatever
it does is very fast... any ideas?

-a

--
  ====================================
  | Ara Howard
  | NOAA Forecast Systems Laboratory
  | Information and Technology Services
  | Data Systems Group
  | R/FST 325 Broadway
  | Boulder, CO 80305-3328
  | Email: ahoward@fsl.noaa.gov
  | Phone:  303-497-7238
  | Fax:    303-497-7259
  ====================================

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: ERROR: out of free buffers: time to abort!
Next
From: Paul M Foster
Date:
Subject: Re: Multiple backend connections