From: | Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | julie(at)hub(dot)org (Julia A(dot)Case) |
Cc: | scrappy(at)hub(dot)org, julie(at)hub(dot)org, pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Re: [HACKERS] attlen weirdness? |
Date: | 1998-03-11 14:44:43 |
Message-ID: | 199803111444.JAA16586@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
>
> Quoting The Hermit Hacker (scrappy(at)hub(dot)org):
> >
> > Bruce? Guys? Any word on this one? I *thought* I remembered reading
> > soething about the 'attlen' becoming -1, but just checked the mailing list
> > archives and couldn't find anything :(
> >
>
> It appears as if atttypmod now has the field length + 4 ???
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.
In the old days, pre 6.3, pg_type.typlen != pg_attribute.attlen for
char() and varchar(), causing all sorts of type-conditional wierness in
the backend for these types. With the new code, pg_type.typlen =
pg_attribute.attlen all the time.
--
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)
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 1998-03-11 14:48:47 | Re: your mail |
Previous Message | Bruce Momjian | 1998-03-11 14:41:07 | Re: [HACKERS] attlen weirdness? |