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)hub(dot)org, scrappy(at)hub(dot)org, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] attlen weirdness?
Date: 1998-03-11 15:20:35
Message-ID: 199803111520.KAA17435@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):
> > 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(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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 1998-03-11 15:26:15 Re: [HACKERS] varchar() vs char16 performance
Previous Message Darren King 1998-03-11 15:03:05 Re: [HACKERS] varchar() vs char16 performance