Skip site navigation (1) Skip section navigation (2)

Re: enum types and binary queries

From: "Merlin Moncure" <mmoncure(at)gmail(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "PostgreSQL Hackers" <pgsql-hackers(at)postgresql(dot)org>, "Andrew Dunstan" <andrew(at)dunslane(dot)net>
Subject: Re: enum types and binary queries
Date: 2007-08-31 12:49:05
Message-ID: b42b73150708310549w28da546av7564ee7e4e9abb6d@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
On 8/30/07, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> "Merlin Moncure" <mmoncure(at)gmail(dot)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

In response to

Responses

pgsql-hackers by date

Next:From: Andrew DunstanDate: 2007-08-31 13:14:47
Subject: Re: enum types and binary queries
Previous:From: Jan WieckDate: 2007-08-31 12:46:28
Subject: Re: Final background writer cleanup for 8.3

pgsql-patches by date

Next:From: Andrew DunstanDate: 2007-08-31 13:14:47
Subject: Re: enum types and binary queries
Previous:From: Pavan DeolaseeDate: 2007-08-31 07:23:51
Subject: Re: HOT patch - version 14

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group