| 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 |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers pgsql-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 | Content-Type | Size |
|---|---|---|
| enumbin.patch | text/x-patch | 5.4 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Gregory Stark | 2007-08-31 14:48:11 | Re: enum types and binary queries |
| Previous Message | Alvaro Herrera | 2007-08-31 14:37:12 | Re: enum types and binary queries |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Gregory Stark | 2007-08-31 14:48:11 | Re: enum types and binary queries |
| Previous Message | Alvaro Herrera | 2007-08-31 14:37:12 | Re: enum types and binary queries |