pg_type populated incorrectly in some cases?

Поиск
Список
Период
Сортировка
От Maurice Gittens
Тема pg_type populated incorrectly in some cases?
Дата
Msg-id 199804080856.KAA08382@david.gits.nl
обсуждение исходный текст
Ответы Re: [HACKERS] pg_type populated incorrectly in some cases?  (Bruce Momjian <maillist@candle.pha.pa.us>)
Список 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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Dwight Johnson
Дата:
Сообщение: Re: [QUESTIONS] warning: tcl support disabled
Следующее
От: "Thomas G. Lockhart"
Дата:
Сообщение: HAVING clause