http://qs1969.pair.com?node_id=184130


in reply to Getting column size/type From DBI

I'm not a pg user, but the Cheetah book lists, under driver specific attributes and methods on page 312, pg_size, which sounds like what you need.

Returns a reference to an array of integer values for each column. The integer shows the storage (not display) size of the column in bytes. Variable length columns are indicated by -1.

- Programming the Perl DBI