PostgreSQL - Full-Text Search
What will be the result of:
SELECT to_tsvector('english', 'Cats and dogs') @@ to_tsquery('english', 'cat | dog');SELECT to_tsvector('english', 'Cats and dogs') @@ to_tsquery('english', 'cat | dog');to_tsvector converts 'Cats and dogs' to tokens 'cat' and 'dog' (stemmed). The to_tsquery searches for 'cat' OR 'dog'.
Since both 'cat' and 'dog' appear, the OR condition is true.
15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions