How can I query for terms like "@foo" with Postgres full text search?
The problem is the default text parser, in that it splits out the '@' symbol

You can see it here:

select 
  ts_lexize('simple', '@foo'), -- {@foo}
  ts_parse('default', '@foo'); -- { (12,@), (1,foo) }


lexize is fine and keeps the @, but the parser splits it out

You'd need to write your own parser or change the source, which isn't fun if you don't know C!

One work-around would be to change @foo to something like ATSYMBOLfoo using some wrapper function for to_tsvector and plainto_tsquery