Alvar Freude <alvar@a-blast.org> writes:
> it seems, that a BYTEA fiels doesn't support indexes in WHERE-Statement
> with a "like" condition:
I was somewhat bemused to discover that we even *have* a LIKE for bytea.
It does not seem to work real well:
regression=# create table foo (f1 bytea);
CREATE TABLE
regression=# select * from foo where f1 like 'z';
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
The connection to the server was lost. Attempting reset: Failed.
The server log shows
TRAP: FailedAssertion("!(((Const *) other)->consttype == 25)", File: "selfuncs.c", Line: 857)
LOG: server process (pid 8487) was terminated by signal 6
which traces down to the fact that patternsel() expects to see only TEXT
patterns. Joe, was it you that put this stuff in? If so, shame on you
for not using --enable-cassert when doing backend work.
regards, tom lane