0

I would like to join two tables based on if a column value in one table has an exact match in a large text column in the other. I guess you could do something like

.... JOIN .... ON t1.col ILIKE '%' || t2.col || '%'

Is this possible using full text search and tsvector? Using PostgreSQL 13.

asked Nov 25, 2021 at 15:05

1 Answer 1

1

I very much overcomplicated this. You can just do

.... JOIN .... ON to_tsvector(t1.col) @@ to_tsquery(t2.col)'
answered Nov 25, 2021 at 22:02

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.