Re: [SQL] tsearch2 query question

2010-08-08 Thread Tom Lane
=?ISO-8859-1?Q?Anders_=D8stergaard_Jensen?= writes: > Now, let's start out with a classic, non-tsearch2 ILIKE query with two > wildcards around the search token: > metabase=# select id, name from customers where name ilike '%holstebr%'; > id | name > --+--- > 3646 | H

Re: [SQL] tsearch2 and wildcards/pattern matching?

2010-07-07 Thread Peter Koczan
On Wed, Jul 7, 2010 at 5:44 PM, Oleg Bartunov wrote: > it's called prefix search: > > =# select 'zvt123456'::tsvector @@ 'zvt:*'; >  ?column? -- >  t Ah, that works. Excellent. Thanks, Peter -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscript

Re: [SQL] tsearch2 and wildcards/pattern matching?

2010-07-07 Thread Oleg Bartunov
it's called prefix search: =# select 'zvt123456'::tsvector @@ 'zvt:*'; ?column? -- t On Wed, 7 Jul 2010, Peter Koczan wrote: Hi all, Is there any sort of pattern matching or partial matching capability in tsearch2? I'd like to be able search for a common prefix (like for order n

Re: [SQL] tsearch2: ts_headline performance problem

2008-01-06 Thread Oleg Bartunov
Anders, headline is a slow, since it should read and process an original document, so you should avoid simple search query, which calculates ts_headline() for each document in the result set. Use subselect instead ! In example below, 2nd query is way faster the 1rd ! select id,headline(body,q),

Re: [SQL] tsearch2() trigger and domain types...

2007-06-19 Thread manchicken
On Tuesday 19 June 2007 09:08:23 Tom Lane wrote: > oidtype = getBaseType(oidtype); I patched this in a FreeBSD 6.2 port. Attached is the patch. Thanks a lot for the help on this. It works like a charm. -- ~ manchicken <>< (A)bort, (R)etry, (I)nfluence with large hammer. 09 F9 11 02 9D 74 E3

Re: [SQL] tsearch2() trigger and domain types...

2007-06-19 Thread Tom Lane
manchicken <[EMAIL PROTECTED]> writes: > Is there any way to cast these column datatypes in the trigger to fool it, No, you'd have to modify the trigger source code. It'd be a pretty trivial change to allow domains over textual types: continue; }

Re: [SQL] tsearch2() trigger and domain types...

2007-06-19 Thread manchicken
On Monday 18 June 2007 17:59:50 Tom Lane wrote: > "Michael D. Stemle, Jr." <[EMAIL PROTECTED]> writes: > > For standardization in my database I use a domain (login_t) for my login > > column in my profile table. > > > > Well, here's what I get upon every update and insert to the profile > > table:

Re: [SQL] tsearch2() trigger and domain types...

2007-06-18 Thread Tom Lane
"Michael D. Stemle, Jr." <[EMAIL PROTECTED]> writes: > For standardization in my database I use a domain (login_t) for my login > column in my profile table. > Well, here's what I get upon every update and insert to the profile table: > WARNING: TSearch: 'login' is not of character type The tse

Re: [SQL] tsearch2

2005-04-22 Thread Dan Feiveson
t tsearch2 -- do you know of any workarounds? Thanks for all your help Oleg, Dan - Original Message - From: "Oleg Bartunov" To: "Dan Feiveson" <[EMAIL PROTECTED]> Sent: Monday, April 18, 2005 10:13 PM Subject: Re: [SQL] tsearch2 > On Mon, 18 Apr 2005, Dan

Re: [SQL] tsearch2

2005-04-19 Thread Oleg Bartunov
d suggests this is a pg error, not tsearch2 -- do you know of any workarounds? upgrade your postgresql Thanks for all your help Oleg, Dan - Original Message - From: "Oleg Bartunov" To: "Dan Feiveson" <[EMAIL PROTECTED]> Sent: Monday, April 18, 2005 10:13 PM Subject

Re: [SQL] tsearch2

2005-04-18 Thread Oleg Bartunov
Dan, I don't remember what the probem you have ? Oleg On Mon, 18 Apr 2005, Dan Feiveson wrote: Hi Oleg, Still trying to get tsearch2 to work ... from archived message board it looks like our problem is that we don't have LC_CTYPE and LC_COLLATE established. We're running 7.3.4 - are there any pote

Re: [SQL] TSearch2 other languages

2004-08-23 Thread Josh Berkus
Cavit, > If you have tsearch support for the other languages we will greatly > appreciate your help. I'm pretty sure that you'll need to implement the other languages yourself. The OpenFTS project (openfts.sourceforge.net) has some documentation on how to do so. The community will really appr

Re: [SQL] tsearch2 question

2003-09-26 Thread Wei Weng
When I ran psql testdb < untsearch2.sql I got the following error message: psql:untsearch2.sql:15: ERROR: RemoveAggregate: aggregate stat(tsvector) does not exist I didn't really do anything before this. Only dropped the trigger and gist index I created (in order to use tsearch2), and alter t

Re: [SQL] tsearch2 question

2003-09-26 Thread Tom Lane
Wei Weng <[EMAIL PROTECTED]> writes: > When I run psql < tsearch2.sql, is psql going to substitute $libdir > internally with what $libdir really is (in my case, it would be > /usr/lib/pgsql)? Not psql, the backend. The point of this is that your CREATE FUNCTION definition can be platform-indep

Re: [SQL] tsearch2 question

2003-09-26 Thread Wei Weng
When I run psql < tsearch2.sql, is psql going to substitute $libdir internally with what $libdir really is (in my case, it would be /usr/lib/pgsql)? Thanks Wei On Fri, 26 Sep 2003, Tom Lane wrote: > Wei Weng <[EMAIL PROTECTED]> writes: > > But then when I do a psql < tsearch2.sql, it compla

Re: [SQL] tsearch2 question

2003-09-26 Thread Tom Lane
Wei Weng <[EMAIL PROTECTED]> writes: > But then when I do a psql < tsearch2.sql, it complains: > bash-2.05a$ psql testdb < tsearch2.sql > ERROR: stat failed on file '$libdir/tsearch2': No such file or directory > Where did I do wrong?? Did you do "make install" after building tsearch2? If you d

Re: [SQL] tsearch2 question

2003-09-26 Thread Wei Weng
But then when I do a psql < tsearch2.sql, it complains: bash-2.05a$ psql testdb < tsearch2.sql SET BEGIN NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index 'pg_ts_dict_pkey' for table 'pg_ts_dict' CREATE TABLE ERROR: stat failed on file '$libdir/tsearch2': No such file or directory

Re: [SQL] tsearch2 question

2003-09-25 Thread Tom Lane
Wei Weng <[EMAIL PROTECTED]> writes: > In my tsearch2.sql there are statements like : > --dict interface > CREATE FUNCTION lexize(oid, text) > returns _text > as '$libdir/tsearch2' > language 'C' > with (isstrict); > I don't think $libdir is the real value that we want. Y