Just use the simple
text search configuration, which works with the simple
dictionary and does not do any stemming:
CREATE INDEX ON tbl USING GIN (to_tsvector('simple', data));
AnAnd query accordingly:
SELECT *
FROM tbl
WHERE to_tsvector('simple', data) @@ to_tsquery('simple', 'foo');
Related: