Re: [HACKERS] attlen weirdness? - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: [HACKERS] attlen weirdness?
Date
Msg-id 199803111553.KAA18128@candle.pha.pa.us
Whole thread Raw
In response to Re: [HACKERS] attlen weirdness?  ("Julia A.Case" <julie@hub.org>)
List 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)

pgsql-hackers by date:

Previous
From: Zeugswetter Andreas
Date:
Subject: AW: [HACKERS] attlen weirdness?
Next
From: "Thomas G. Lockhart"
Date:
Subject: Re: [HACKERS] varchar() vs char16 performance