Re: [GENERAL] Query on a record variable

2013-08-19 Thread Giuseppe Broccolo
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_tsqu

Re: [GENERAL] Query on a record variable

2013-08-18 Thread Adrian Klaver
On 08/18/2013 01:14 PM, Janek Sendrowski wrote: Hi, How can I do a query on a record variable in a function. I want to do a dirty fulltextsearch on a table and then choose the string which have a low levenshtein-distance. I wanted to it like this, but it doesn't work: v_query := 'SELECT col FR

[GENERAL] Query on a record variable

2013-08-18 Thread Janek Sendrowski
Hi, How can I do a query on a record variable in a function. I want to do a dirty fulltextsearch on a table and then choose the string which have a low levenshtein-distance. I wanted to it like this, but it doesn't work: v_query := 'SELECT col FROM table WHERE LENGTH(dede) BETWEEN x AND y AND p