Simple postgreSQL question (or maybe its generic sql idk)

any postgres gigachads in here? or maybe this is in plain sql too. but what is the different between these two
select id, force, name, "equipment_name"
from "Exercise"
where
(to_tsvector(name) || to_tsvector(force))
@@
to_tsquery('pull | seated')
select id, force, name, "equipment_name"
from "Exercise"
where
(to_tsvector(name) || to_tsvector(force))
@@
to_tsquery('pull | seated')
and
select id, force, name, "equipment_name"
from "Exercise"
where
to_tsvector(name || ' ' || force)
@@
to_tsquery('pull | seated')
select id, force, name, "equipment_name"
from "Exercise"
where
to_tsvector(name || ' ' || force)
@@
to_tsquery('pull | seated')
in particular line 4
1 Reply
bigsexy
bigsexyOP3y ago
im assuming it ends up being the same thing but the first one alows for some specificy with the tsvector args like (to_tsvector('english', name) || to_tsvector('simple', force))
Want results from more Discord servers?
Add your server