Re: Corrupt Table

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Corrupt Table
Дата
Msg-id 20227.969028265@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Corrupt Table  ("Bryan White" <bryan@arcamax.com>)
Список pgsql-general
"Bryan White" <bryan@arcamax.com> writes:
> I would still like to refine my pganal tool to look inside of tuples.  Where
> should I look to find information about the internal structure?  Is it
> parsable at some level on its own or do I have to consult the system tables
> to determine stucture.  I suspect this might get more complicated once TOAST
> is available.

The tuple layout is basically

    header
    bitmap of which fields are null
    values for non-null fields

The header is type HeapTupleHeaderData defined in
src/include/access/htup.h.  The bitmap is omitted if the header's
infomask shows the tuple contains no nulls; otherwise its length
in bits is the same as the t_natts field of the header.

The data values are uninterpretable without looking up the set of
column datatypes for the table...

            regards, tom lane

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

Предыдущее
От: "Adam Lang"
Дата:
Сообщение: Re: what is the equivalent of oracle's DESCRIBE table?
Следующее
От: Ron Peterson
Дата:
Сообщение: Re: what is the equivalent of oracle's DESCRIBE table?