Ivan,

what's wrong with:

postgres=# select 'abc:1'::tsvector;
 tsvector
----------
 'abc':1

postgres=# select setweight('abc:1'::tsvector,'a');
 setweight
-----------
 'abc':1A

or just use to_tsvector() instead of casting?

Oleg
On Mon, 8 Feb 2010, Ivan Sergio Borgonovo wrote:

If I convert a string to a tsvector just casting (::tsvector) I
obtain a vector without positions.
tsvectors without positions don't have weights too.

I haven't found a way to turn a vector without weight/pos, into a
vector with weight/pos.

Is there a way to apply weight/add positions to tsvectors without
positions?
Is there any use-case?



        Regards,
                Oleg
_____________________________________________________________
Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru),
Sternberg Astronomical Institute, Moscow University, Russia
Internet: o...@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to