From: | Ivan Sergio Borgonovo <mail(at)webthatworks(dot)it> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | C function to create tsquery not working |
Date: | 2010-02-11 19:11:54 |
Message-ID: | 20100211201154.3c1fa302@dawn.webthatworks.it |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
I'm still having trouble making this work:
http://pgsql.privatepaste.com/14a6d3075e
CREATE OR REPLACE FUNCTION tsvector_to_tsquery(IN tsv tsvector, op
IN char(1), weights IN varchar(4), maxpos IN smallint
)
RETURNS tsquery
AS 'MODULE_PATHNAME'
LANGUAGE C STRICT;
What I expect is:
tsvector_to_tsquery('java tano', '&', 'ABCD', 100) ->
java & tano
tsvector_to_tsquery('java:1A,2B tano:3C,4D', '&', 'ABC', 100) ->
java:A & java:B & tano:C
tsvector_to_tsquery('java:1A,2B tano:3C,4D', '|', 'ABC', 100) ->
java:AB | tano:C
I've made some improvement compared to previous version I've posted
but still it returns an empty tsquery.
Things that works:
- tsvector_tsquery_size returns reasonable total length of strings
and total number of (operand + operator)
- curout is actually filled with a lexeme
- filters (wf, posmax) work
--
Ivan Sergio Borgonovo
http://www.webthatworks.it
From | Date | Subject | |
---|---|---|---|
Next Message | Bill Moran | 2010-02-11 19:16:32 | Re: pg_dump superflous warning message |
Previous Message | u235sentinel | 2010-02-11 19:08:33 | Re: Postgres Triggers issue |