Re: Enum on-disk format

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Scott Bailey <artacus(at)comcast(dot)net>
Cc: PostgreSQL <pgsql-general(at)postgresql(dot)org>
Subject: Re: Enum on-disk format
Date: 2009-11-18 23:49:11
Message-ID: 29530.1258588151@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Scott Bailey <artacus(at)comcast(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Nick 2009-11-19 00:42:49 Re: Can anyone help setting up pgbouncer?
Previous Message Scott Bailey 2009-11-18 23:45:44 Enum on-disk format