Re: bytea operator bugs (was Re: [GENERAL] BYTEA, indexes

From: Joe Conway <mail(at)joeconway(dot)com>
To: Alvar Freude <alvar(at)a-blast(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-patches(at)postgresql(dot)org
Subject: Re: bytea operator bugs (was Re: [GENERAL] BYTEA, indexes
Date: 2002-09-02 01:58:19
Message-ID: 3D72C5BB.8080709@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2002-09-02 02:50:30 Re: CREATE INDEX .. ON table1 (field1 asc, field2 desc)
Previous Message Alvar Freude 2002-09-02 00:25:05 Re: bytea operator bugs (was Re: [GENERAL] BYTEA,

Browse pgsql-patches by date

  From Date Subject
Next Message Christopher Kings-Lynne 2002-09-02 02:13:46 fulltextindex update
Previous Message Alvar Freude 2002-09-02 00:25:05 Re: bytea operator bugs (was Re: [GENERAL] BYTEA,