pg_type populated incorrectly in some cases?

From: Maurice Gittens <mgittens(at)david(dot)gits(dot)nl>
To: hackers(at)postgresql(dot)org
Subject: pg_type populated incorrectly in some cases?
Date: 1998-04-08 08:56:50
Message-ID: 199804080856.KAA08382@david.gits.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

In include/catalog/pg_type.h I've noticed the following code.

<Code>
CATALOG(pg_type) BOOTSTRAP
{
NameData typname;
Oid typowner;
int2 typlen;

/*
* typlen is the number of bytes we use to represent a value of this
* type, e.g. 4 for an int4. But for a variable length type, typlen
* is -1.

...
</Code>

The pg_type catalog is then populated with lines like the following.

<Code>
DATA(insert OID = 71 ( pg_type PGUID 1 1 t b t \054 1247 0 foo bar foo bar c _null_));
DATA(insert OID = 75 ( pg_attribute PGUID 1 1 t b t \054 1249 0 foo bar foo bar c _null_));
DATA(insert OID = 81 ( pg_proc PGUID 1 1 t b t \054 1255 0 foo bar foo bar c _null_));
DATA(insert OID = 83 ( pg_class PGUID 1 1 t b t \054 1259 0 foo bar foo bar c _null_));

</Code>

Notice that the type length for types like pg_class have the value of one (1)?
I would have expected them to the same length as an oid.
Am I just seeing things?

Thanks with regards from Maurice

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas G. Lockhart 1998-04-08 14:18:10 HAVING clause
Previous Message Dwight Johnson 1998-04-08 07:58:42 Re: [QUESTIONS] warning: tcl support disabled