pg_attribute.attlen -1 for varchar e pbchar fields

From: "jimmy(dot)olsen" <jimmy(dot)olsen(at)ig(dot)com(dot)br>
To: <pgsql-sql(at)postgresql(dot)org>
Subject: pg_attribute.attlen -1 for varchar e pbchar fields
Date: 2005-06-27 17:27:41
Message-ID: 000201c57b3d$c6e0f420$230a0a0a@ligaone.com.br
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi listers,
I'm facing a problem getting information from meta tables. The command:
SELECT attname, atttypid, attlen
FROM pg_attribute
where atttypid IN(1042, 1043)

The attlen column always returns -1 for bpchar and varchar columns. the
postgre version is 8.0.1. When I look the tables in pgAdmin the column
lengths are correct. Where can I find the correct column lengths??

Alessandro - Liga One Sistemas
alessandro(at)ligaone(dot)com(dot)br

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Sean Davis 2005-06-27 17:31:37 Re: How can I simply substatue a value in a query?
Previous Message Martín Marqués 2005-06-27 17:17:28 Re: SELECT * FROM foo OFFSET -1 LIMIT 1