Re: Getting lengths of variable fields

From: Michelle Murrain <mpm(at)norwottuck(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Getting lengths of variable fields
Date: 2001-03-06 00:24:30
Message-ID: 01030519243001.14249@chicago.murrain.net
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Monday 05 March 2001 05:55 pm, Tom Lane wrote:
>
> This info is stored in the 'atttypmod' field of pg_attribute, but I
> don't know whether DBD::Pg provides any handy interface to that. You
> might have to get down-and-dirty enough to select it directly out of
> pg_attribute ...

Ah, I got it. Just do a select. It's a system table I hadn't learned about
yet. And, I have to subtract 4 from it to get the real length. Thanks!!

Michelle
------------
Michelle Murrain, Ph.D.
President
Norwottuck Technology Resources
mpm(at)norwottuck(dot)com
http://www.norwottuck.com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Michelle Murrain 2001-03-06 00:34:48 Re: Getting lengths of variable fields
Previous Message Limin Liu 2001-03-06 00:08:42 Re: Daily Digest V1 #377