Re: [GENERAL] Enum on-disk format

2009-11-19 Thread Peter Eisentraut
On ons, 2009-11-18 at 22:33 -0800, Scott Bailey wrote: > The only I/O functions I'm aware of are > send, recv, in and out. What controls converting from/to wire and > on-disk formats? send and recv > And why is wire format little endian and disk big endian? The wire format is network order (w

Re: [GENERAL] Enum on-disk format

2009-11-18 Thread Scott Bailey
Tom Lane wrote: Scott Bailey 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 v

Re: [GENERAL] Enum on-disk format

2009-11-18 Thread Tom Lane
Scott Bailey 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

[GENERAL] Enum on-disk format

2009-11-18 Thread Scott Bailey
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?