Getting lengths of variable fields

From: Michelle Murrain <mpm(at)norwottuck(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Getting lengths of variable fields
Date: 2001-03-05 21:44:54
Message-ID: 0103051644530B.13048@chicago.murrain.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi folks,

I'm writing a very robust validation script in perl for database entry. One
of the things I'd like to do is check how large a field is, and make sure
that the entry into that field isn't too big. Problem is, for variable length
fields, DBD::Pg returns a -1 size, using the pg_size attribute.

Is there something I am missing? Is there a way to get the size of variable
length types using DBI/DBD::Pg, in particular, char() and varchar()?

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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Peter Eisentraut 2001-03-05 21:53:05 Re: multiple dbs on a port
Previous Message chris markiewicz 2001-03-05 21:20:49 multiple dbs on a port