Re: [HACKERS] attlen weirdness?

Bruce Momjian <maillist@candle.pha.pa.us>

From: Bruce Momjian <maillist@candle.pha.pa.us>
To: julie@postgreSQL.org (Julia A.Case)
Cc: julie@postgreSQL.org, julie@hub.org, scrappy@hub.org, pgsql-hackers@postgreSQL.org
Date: 1998-03-11T15:53:10Z
Lists: pgsql-hackers
> 
> Quoting Bruce Momjian (maillist@candle.pha.pa.us):
> > 
> > pg_attribute.atttypmod.
> > 
> 	this field appears to be field size + 4
>         in a char(1024) field it returns 1028
>         in a char(10) it returns 14
> 
>         is it padded?
> 

Yes.  All varlena sizes store the VARHDRSZ, variable header size of 4,
in the length field.

-- 
Bruce Momjian                          |  830 Blythe Avenue
maillist@candle.pha.pa.us              |  Drexel Hill, Pennsylvania 19026
  +  If your life is a hard drive,     |  (610) 353-9879(w)
  +  Christ can be your backup.        |  (610) 853-3000(h)