Hi Janek,
Hi, ok :)
I suppose you have a table 'table' with 'col' (text), 'dede' (text) and 'vectors' (tsvector) as fields. In this case, you can do
SELECT levenshtein(col, 'string') FROM table AS lev WHERE levenshtein(col, 'string') < 10 AND LENGTH(dede) BETWEEN x AND y AND plainto_tsquery('string') @@ vectors;
Hope it can help. Giuseppe. -- Giuseppe Broccolo - 2ndQuadrant Italy PostgreSQL Training, Services and Support giuseppe.broccolo@xxxxxxxxxxxxxx | www.2ndQuadrant.it -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general