Re: combining strings to make a query

Поиск
Список
Период
Сортировка
От Wes James
Тема Re: combining strings to make a query
Дата
Msg-id CAFjCMHv2suaCMTdDZMa133UT8mPvGT8Aiv3xd1oMZrT1OETKeg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: combining strings to make a query  (Kevin Crain <kevin.crain1@gmail.com>)
Список pgsql-sql
Thank you for the tsvectors info!

-wes

On Wed, Jul 13, 2011 at 12:11 AM, Kevin Crain <kevin.crain1@gmail.com> wrote:
> You can do full-text search in postgres now using ts_vectors.  I'd
> recommend going that route.  Doing like comparisons is not a good idea
> if you don't know the first part of the string you are searching
> for....It appears to be much faster from my experience to search for
> ab% than it is to search for %ab%.
>
> On Tue, Jul 12, 2011 at 7:51 PM, Wes James <comptekki@gmail.com> wrote:
>> I'm using Erlang and postgresql to build a web interface.  When I
>> create the query string I get something like:
>>
>> select * from table where field::text ilike '%\\\\%'
>>
>> But when I do that (if someone types in '\' for part of the text
>> search), I get a pg log entry to use E'\\'
>>
>> How would I use E'' with ilike '%%'.  ilike E'%\\%' doesn't work.
>>
>> Thanks,
>>
>> -wes
>>
>> --
>> Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgsql-sql
>>
>


В списке pgsql-sql по дате отправления:

Предыдущее
От: "ktm@rice.edu"
Дата:
Сообщение: Re: Select random lines of a table using a probability distribution
Следующее
От: Miguel Angel Conte
Дата:
Сообщение: Re: Max column number.