"Merlin Moncure" <[EMAIL PROTECTED]> writes:
> On 8/30/07, Tom Lane <[EMAIL PROTECTED]> wrote:
>> "Merlin Moncure" <[EMAIL PROTECTED]> writes:
>> > I noticed that enums are not available to be queried as binary through
>> > the protocol.
>> What do you think the binary representation ought to be? Copying OIDs
>> seems pretty useless.
> I'm on the fence on this one.
> I actually think this would be ok, if you mean pg_enum.oid, or the
> string would be fine too. I agree that binary protocol is supposed to
> be fast, and I can prefetch the pg_enum table to the client and do the
> magic there. Many other binary formats do similarly inscrutable
I think it would be ok only if a pg_dump/pg_restore reliably restored the same
oid->enum value mapping. Otherwise a binary dump is useless. But as I
understand it that's the case currently, is it?
You would also have to have some way for a client to simply look up the enum
mapping. Something like an SRF that returned setof(oid,name).
My first instinct was to just use the enum name but I'm starting to think this
would be better. It is more in line with the promise of enums which is that
the names are just labels and the data internally is fixed size.
---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly