Hi,

I have encountered strange errors while testing PostgreSQL 8.4 beta2.

SELECT msg_sid FROM msginfo WHERE plainto_tsquery(E'test') @@
body_index;
or
SELECT msg_sid FROM msginfo WHERE to_tsquery(E'test') @@ body_index;

produces following errors:

ERROR:  tuple offset out of range: 0
(occasionally ERROR:  tuple offset out of range: 459)

Here is the table definition:

CREATE TABLE msginfo (
        msg_sid BIGSERIAL PRIMARY KEY,
        file_size INTEGER,
        file_mtime TIMESTAMP,
        msg_date TIMESTAMP,
        flags INTEGER,
        hdr_from TEXT,
        hdr_to TEXT,
        hdr_cc TEXT,
        hdr_newsgroups TEXT,
        hdr_subject TEXT,
        hdr_msgid TEXT UNIQUE NOT NULL,
        hdr_inreplyto TEXT,
        hdr_references TEXT,
        body_text TEXT,
        body_index TSVECTOR
);
CREATE INDEX msginfo_msg_date_index ON msginfo (msg_date);
CREATE INDEX msginfo_body_index ON msginfo USING gin (body_index);

and other info:

Ubuntu 8.04
./configure --prefix=/usr/local/pgsql84
initdb -E UTF-8 --no-locale /path/to/database

sylph=# EXPLAIN SELECT msg_sid FROM msginfo WHERE to_tsquery('test') @@ 
body_index;
                                   QUERY PLAN                                   
 
--------------------------------------------------------------------------------
-
 Bitmap Heap Scan on msginfo  (cost=4.59..8.61 rows=1 width=8)
   Recheck Cond: (to_tsquery('test'::text) @@ body_index)
   ->  Bitmap Index Scan on msginfo_body_index  (cost=0.00..4.59 rows=1 width=0)
         Index Cond: (to_tsquery('test'::text) @@ body_index)
(4 rows)
--
Tatsuo Ishii
SRA OSS, Inc. Japan

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

Reply via email to