Re: [HACKERS] attlen weirdness?

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: julie(at)postgreSQL(dot)org (Julia A(dot)Case)
Cc: julie(at)postgreSQL(dot)org, julie(at)hub(dot)org, scrappy(at)hub(dot)org, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] attlen weirdness?
Date: 1998-03-11 15:53:10
Message-ID: 199803111553.KAA18128@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>
> Quoting Bruce Momjian (maillist(at)candle(dot)pha(dot)pa(dot)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(at)candle(dot)pha(dot)pa(dot)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)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas G. Lockhart 1998-03-11 16:15:39 Re: [HACKERS] varchar() vs char16 performance
Previous Message Zeugswetter Andreas 1998-03-11 15:47:56 AW: [HACKERS] attlen weirdness?