From: | "Rick Schumeyer" <rschumeyer(at)ieee(dot)org> |
---|---|
To: | "'PgSql General'" <pgsql-general(at)postgresql(dot)org> |
Subject: | tsearch2: more than one index per table? |
Date: | 2005-11-23 04:45:05 |
Message-ID: | 017601c5efe8$afeb4610$0300a8c0@dell8200 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Is there something in tsearch2 that prevents more than one index per table?
I would like an index on field A, and a separate index on field B.
The index builds fine for A, but gives an error for B. The error text is
ERROR: could not find tsearch config by locale
The code below is taken almost verbatim from the tsearch2 documentation.
Any help is appreciated!
================================================================
\i /home/rick/ftp/postgresql-8.1.0/contrib/tsearch2/tsearch2.sql
CREATE TABLE t (a varchar(20), b varchar(20));
INSERT INTO t (a,b) VALUES ('hello world','quick brown fox');
--
-- A
--
ALTER TABLE t ADD COLUMN idxA tsvector;
UPDATE t SET idxA=to_tsvector('default', a);
VACUUM FULL ANALYZE;
CREATE INDEX idxA_idx ON t USING gist(idxA);
VACUUM FULL ANALYZE;
CREATE TRIGGER ts_A_Update BEFORE UPDATE OR INSERT ON t
FOR EACH ROW EXECUTE PROCEDURE tsearch2(idxA, a);
--
-- B
--
ALTER TABLE t ADD COLUMN idxB tsvector;
--
-- The next line gives: ERROR: could not find tsearch config by locale
--
UPDATE t SET idxB=to_tsvector('default', b);
VACUUM FULL ANALYZE;
CREATE INDEX idxB_idx ON t USING gist(idxB);
VACUUM FULL ANALYZE;
CREATE TRIGGER ts_B_Update BEFORE UPDATE OR INSERT ON t
FOR EACH ROW EXECUTE PROCEDURE tsearch2(idxB, b);
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2005-11-23 04:50:42 | Re: Why pgAdmin III guru suggests VACUUM in 8.1 |
Previous Message | Joe Conway | 2005-11-23 04:42:08 | Re: Set Returning Function (Pipelining) |