Re: bytea operator bugs (was Re: [GENERAL] BYTEA, indexes - Mailing list pgsql-patches

From Joe Conway
Subject Re: bytea operator bugs (was Re: [GENERAL] BYTEA, indexes
Date
Msg-id 3D72C5BB.8080709@joeconway.com
Whole thread Raw
In response to bytea operator bugs (was Re: [GENERAL] BYTEA, indexes and "like")  (Joe Conway <mail@joeconway.com>)
List pgsql-patches
Alvar Freude wrote:
> With this, the limits in Bytea indexes are removed? Great!

Depends on what you mean by limits, but yes, it does enable the
optimizer to use an index given:
    ... WHERE bytea_field LIKE 'abc%';
and an index on "bytea_field".

> As far is I followed the discussion, there where some additionsl limits
> on bytea indexes (and like); or are they removed with this patch?

Not sure what you're referring to here. The patch I sent in a few weeks
ago (and which was applied) did impose a limit of sorts in that it
forces the 'abc%' above to be cast as text, which would make it
impossible to search for a pattern which includes a '\0' character, for
example.

> I'll try it sometime later and make some performance checks -- in the
> hopem that bytea is faster then texts ;-) (at least the base 255 encoding
> i can throw out of my application).

Note that there is no guarantee that this will get applied to cvs for
7.3. The freeze for 7.3 beta is supposed to be tonight, and this patch
will need some review, as it is non-trivial.

Joe


pgsql-patches by date:

Previous
From: Joe Conway
Date:
Subject: Re: bytea operator bugs (was Re: [GENERAL] BYTEA, indexes
Next
From: "Christopher Kings-Lynne"
Date:
Subject: fulltextindex update