Re: tsearch2 under win32

From: "Darko Prenosil" <Darko(dot)Prenosil(at)finteh(dot)hr>
To: "Darko Prenosil" <Darko(dot)Prenosil(at)finteh(dot)hr>, <pgsql-hackers-win32(at)postgresql(dot)org>
Subject: Re: tsearch2 under win32
Date: 2004-05-11 17:45:37
Message-ID: 000501c4377f$cc8c7d70$0289bfd5@darko
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers-win32

OK, I got it work, but I don't think that this way would be acceptable:
I downloaded GNU regex.c and regex.h and included it into tsearch2 sources.
There are also few modifications in regex.c
Basic test is giving correct results. Should I send modifications ? Hackers
?

Here are the results:

SELECT '1'::tsvector;
SELECT '1 '::tsvector;
SELECT ' 1'::tsvector;
SELECT ' 1 '::tsvector;
SELECT '1 2'::tsvector;
SELECT '\'1 2\''::tsvector;
SELECT '\'1 \\\'2\''::tsvector;
SELECT '\'1 \\\'2\'3'::tsvector;
SELECT '\'1 \\\'2\' 3'::tsvector;
SELECT '\'1 \\\'2\' \' 3\' 4 '::tsvector;
select '\'w\':4A,3B,2C,1D,5 a:8';
select 'a:3A b:2a'::tsvector || 'ba:1234 a:1B';
select setweight('w:12B w:13* w:12,5,6 a:1,3* a:3 w asd:1dc asd
zxc:81,567,222A'::tsvector, 'c');
select strip('w:12B w:13* w:12,5,6 a:1,3* a:3 w asd:1dc asd'::tsvector);

tsvector
----------
'1'
(1 row)

tsvector
----------
'1'
(1 row)

tsvector
----------
'1'
(1 row)

tsvector
----------
'1' '2'
(1 row)

tsvector
----------
'1 2'
(1 row)

tsvector
----------
'1 \'2'
(1 row)

tsvector
-------------
'3' '1 \'2'
(1 row)

tsvector
-------------
'3' '1 \'2'
(1 row)

tsvector
------------------
'4' ' 3' '1 \'2'
(1 row)

?column?
-----------------------
'w':4A,3B,2C,1D,5 a:8
(1 row)

?column?
----------------------------
'a':3A,4B 'b':2A 'ba':1237
(1 row)

setweight
----------------------------------------------------------
'a':1C,3C 'w':5C,6C,12C,13C 'asd':1C 'zxc':81C,222C,567C
(1 row)

strip
---------------
'a' 'w' 'asd'

Regards !

In response to

Responses

Browse pgsql-hackers-win32 by date

  From Date Subject
Next Message Tom Lane 2004-05-11 18:02:47 Re: tsearch2 under win32
Previous Message Darko Prenosil 2004-05-11 16:43:36 tsearch2 under win32