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

Re: [HACKERS] enum types and binary queries

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Merlin Moncure <mmoncure(at)gmail(dot)com>, "Patches (PostgreSQL)" <pgsql-patches(at)postgresql(dot)org>, Tom Dunstan <tom(at)tomd(dot)cc>
Subject: Re: [HACKERS] enum types and binary queries
Date: 2007-08-31 14:44:43
Message-ID: 46D8295B.4040908@dunslane.net (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches

Tom Lane wrote:
>
> Andrew's idea of using the enum ordinal value would meet that test, but
> at least with the current layout of pg_enum it would be quite expensive
> to do the conversion in either direction --- you'd have to fetch
> multiple catalog rows.  I think we'd have to add another column showing
> the ordinal value, and put an index on it, to make I/O reasonably fast.
> Doesn't really seem worth it.
>
> 			
>   

Yeah. I think we should treat enums just as we do text, for this purpose.

Here's a patch (minus catalog bump) which I think does that.

cheers

andrew

Attachment: enumbin.patch
Description: text/x-patch (5.4 KB)

In response to

Responses

pgsql-hackers by date

Next:From: Gregory StarkDate: 2007-08-31 14:48:11
Subject: Re: enum types and binary queries
Previous:From: Alvaro HerreraDate: 2007-08-31 14:37:12
Subject: Re: enum types and binary queries

pgsql-patches by date

Next:From: Gregory StarkDate: 2007-08-31 14:48:11
Subject: Re: enum types and binary queries
Previous:From: Alvaro HerreraDate: 2007-08-31 14:37:12
Subject: Re: enum types and binary queries

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