partial text search

Поиск
Список
Период
Сортировка
От avpro avpro
Тема partial text search
Дата
Msg-id CAAQdDnkk3=9UZ55Wp_JUXX0JfXHy2O-L=ehsxmeUL-4r1g6L1w@mail.gmail.com
обсуждение исходный текст
Список pgsql-novice

> Hi,
>
> my task is to search partial text in the fields mentioned in query. Basically I have to tables t1 and t2 and I need to search in t1 all the codes returned by a query from t2. In t1 the values could be identical as in t2 or could be partial. For example.
>
> T1:
>
> Description
>
> 190201 – is not our student
>
> 190202 – is …
>
> 190202
>
> T2:
>
> Description
>
> 190202
>
> My query should return for item “190202” from t2 all the columns where this text is found in t1, but not necessary identical. The result will be the last two rows from T1:
>
> 190202 – is …
>
> 190202
>
> I have tried something similar with the following:
>
> SELECT description FROM t1 WHERE description LIKE '195004'
>
> Instead of ‘195004’ I would like to put one by one all elements returned by another query:
>
> SELECT description FROM t2
>
> Any idea how to do that?
>
> I was looking on the partial text search with tsvector and tsquery, but I’m not sure how to put the queries should be something like this:
>
> SELECT to_tsvector(t1.description) @@ to_tsquery(SELECT description FROM t2);
>
> Thank you.

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

Предыдущее
От: Sean Davis
Дата:
Сообщение: Re: How can I prevent duplicate inserts by multiple concurrent threads ?
Следующее
От: James David Smith
Дата:
Сообщение: Upgrade Ubuntu - PostgresSQL is ok?