Re: Where does catalog store CHAR length ?

From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: phd9110 <phd9110(at)cs(dot)nchu(dot)edu(dot)tw>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Where does catalog store CHAR length ?
Date: 2003-12-01 13:32:17
Message-ID: 20031201133217.GB14543@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Dec 01, 2003 at 06:31:56PM +0800, phd9110 wrote:

> the table pg_attribute have the attribute "attlen" , and this attribute will
> store the attribute length. For example , when integer , this value will be 4.
> But if attribute type is Char(xx), this value will be -1. This is because it
> reference the bychar in pg_type table.
>
> So, where is the Char() length information store ??

atttypmod is the maximum length + 4.

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"El destino baraja y nosotros jugamos" (A. Schopenhauer)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2003-12-01 13:33:23 Re: default operator class: btree or hash
Previous Message Andreas Pflug 2003-12-01 12:40:37 Re: Foreign key data type mismatches