Re: Enum on-disk format

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Enum on-disk format
Дата
Msg-id 29530.1258588151@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Enum on-disk format  (Scott Bailey <artacus@comcast.net>)
Ответы Re: Enum on-disk format  (Scott Bailey <artacus@comcast.net>)
Список pgsql-general
Scott Bailey <artacus@comcast.net> writes:
> I'm trying to better understand the internals of Postgres, and I'm
> looking at the enum type. The docs say that an enum value is stored on
> disk as 4 bytes. But enum_send() returns a bytea representing the actual
> text of the value and not the index of that value.  So what step am I
> missing here?

The wire format isn't necessarily the on-disk format.  In this case
we concluded that the internal OID value wouldn't be of any use to
clients.

> Also, is there a way to see the raw data for the tuple on a page?

Try contrib/pageinspect, and read
http://developer.postgresql.org/pgdocs/postgres/storage-page-layout.html

            regards, tom lane

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

Предыдущее
От: Scott Bailey
Дата:
Сообщение: Enum on-disk format
Следующее
От: weixiang tam
Дата:
Сообщение: Re: Customize the install directory of the postgres DB