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

From Bruce Momjian
Subject Re: [HACKERS] attlen weirdness?
Date
Msg-id 199803111520.KAA17435@candle.pha.pa.us
Whole thread Raw
In response to Re: [HACKERS] attlen weirdness?  ("Julia A.Case" <julie@hub.org>)
Responses Re: [HACKERS] attlen weirdness?  ("Julia A.Case" <julie@hub.org>)
List pgsql-hackers
>
> Quoting Bruce Momjian (maillist@candle.pha.pa.us):
> > I assume you are asking of attlen for char() and varchar() have the max
> > length.  The answer is now NO.  They are varlena structures like text,
> > and so have a attlen of -1.  Atttypmod for that pg_attribute row now has
> > the defined length.
> >
>
>     Even for a char(4) field?  ok, if attlen doesn't give the
> length of a field, how do I find it?

pg_attribute.atttypmod.

--
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: "Julia A.Case"
Date:
Subject: Re: [HACKERS] attlen weirdness?
Next
From: "Julia A.Case"
Date:
Subject: Re: [HACKERS] attlen weirdness?