Andrew Dunstan <[EMAIL PROTECTED]> writes:
> Merlin Moncure wrote:
>> I noticed that enums are not available to be queried as binary through
>> the protocol.

> The trouble is that an enum doesn't have an immutable internal binary value.

> I guess we could say that the binary value is the integer offset of the 
> value in the enum ordering, and translate it back on input. Providing 
> the binary IO funcs shouldn't be too hard if we do that, unless I'm 
> missing something.

That would be expensive to get, wouldn't it?  The main point of binary
I/O is to be fast, so I'm not excited about an expensive conversion.

What if we just defined the binary format as being identical to the text
format, ie, the enum label?  A bit silly but at least it would eliminate
the gotcha that binary I/O fails.

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq

Reply via email to