| From: | Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us> | 
|---|---|
| To: | andreas(dot)zeugswetter(at)telecom(dot)at (Zeugswetter Andreas) | 
| Cc: | pgsql-hackers(at)hub(dot)org | 
| Subject: | Re: AW: [HACKERS] attlen weirdness? | 
| Date: | 1998-03-11 19:08:04 | 
| Message-ID: | 199803111908.OAA21852@candle.pha.pa.us | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers | 
> 
> Quoting Bruce Momjian (maillist(at)candle(dot)pha(dot)pa(dot)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?
> 
> Right now: yes, but I would like to see the char() type changed to a fixed length type (which it really is)
> then it would have the length in attlen. Right now the length for char and varchar is in atttypmod.
> 
Again, we can do this, but we then have to have atttypmod available in
all places where we check for length.  I will add it to the TODO list.
-- 
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 | Brett McCormick | 1998-03-11 20:29:14 | Re: [HACKERS] varchar() vs char16 performance | 
| Previous Message | Bruce Momjian | 1998-03-11 19:05:17 | Re: [HACKERS] indexing words slow |