Re: enum types and binary queries - Mailing list pgsql-hackers

From Merlin Moncure
Subject Re: enum types and binary queries
Date
Msg-id b42b73150708310549w28da546av7564ee7e4e9abb6d@mail.gmail.com
Whole thread Raw
In response to Re: enum types and binary queries  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: enum types and binary queries  (Andrew Dunstan <andrew@dunslane.net>)
Re: enum types and binary queries  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: enum types and binary queries  (Gregory Stark <stark@enterprisedb.com>)
Re: enum types and binary queries  (Decibel! <decibel@decibel.org>)
List pgsql-hackers
On 8/30/07, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> "Merlin Moncure" <mmoncure@gmail.com> 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
things.

One other very small observation: afaict, there appears to be no way
to list enum contents in psql (although you can list the enums
themselves in the type listing).  Maybe this should be possible?  I'm
willing to take a stab at these things if Andrew is busy.

merlin


pgsql-hackers by date:

Previous
From: Jan Wieck
Date:
Subject: Re: Final background writer cleanup for 8.3
Next
From: Andrew Dunstan
Date:
Subject: Re: enum types and binary queries