Re: [SQL] Index to support LIKE '%suffix' queries

2006-03-01 Thread A. Kretschmer
am 01.03.2006, um 8:19:40 +0100 mailte Florian Weimer folgendes: > * Alvaro Herrera: > > >> > Florian Weimer <[EMAIL PROTECTED]> writes: > >> >> Is it possible to create an index to support queries of the form > >> >> "column LIKE '%suffix'" (similar to an ordinary index for LIKE > >> >> 'prefix

Re: [SQL] Index to support LIKE '%suffix' queries

2006-03-01 Thread Florian Weimer
* Alvaro Herrera: >> > Florian Weimer <[EMAIL PROTECTED]> writes: >> >> Is it possible to create an index to support queries of the form >> >> "column LIKE '%suffix'" (similar to an ordinary index for LIKE >> >> 'prefix%', which I also need)? > > It is possible to create a functional index on the

Re: [SQL] Index to support LIKE '%suffix' queries

2006-02-25 Thread Alvaro Herrera
> > Florian Weimer <[EMAIL PROTECTED]> writes: > >> Is it possible to create an index to support queries of the form > >> "column LIKE '%suffix'" (similar to an ordinary index for LIKE > >> 'prefix%', which I also need)? It is possible to create a functional index on the reverse of the string. Yo

Re: [SQL] Index to support LIKE '%suffix' queries

2006-02-25 Thread Florian Weimer
* Tom Lane: > Florian Weimer <[EMAIL PROTECTED]> writes: >> Is it possible to create an index to support queries of the form >> "column LIKE '%suffix'" (similar to an ordinary index for LIKE >> 'prefix%', which I also need)? > > Sounds like what you *really* need is full-text search, not half > me

Re: [SQL] Index to support LIKE '%suffix' queries

2006-02-25 Thread Tom Lane
Florian Weimer <[EMAIL PROTECTED]> writes: > Is it possible to create an index to support queries of the form > "column LIKE '%suffix'" (similar to an ordinary index for LIKE > 'prefix%', which I also need)? Sounds like what you *really* need is full-text search, not half measures ... have you loo

[SQL] Index to support LIKE '%suffix' queries

2006-02-25 Thread Florian Weimer
Is it possible to create an index to support queries of the form "column LIKE '%suffix'" (similar to an ordinary index for LIKE 'prefix%', which I also need)? I could define a function which reverts strings (or revert them in the application) and use a normal B-tree index, but I wonder if there is