BUG #1694: LIKE fails on column with domain after ANALYZE - Mailing list pgsql-bugs

From Kevin J. Grittner
Subject BUG #1694: LIKE fails on column with domain after ANALYZE
Date
Msg-id 20050531214721.C9735F0B03@svr2.postgresql.org
Whole thread Raw
Responses Re: BUG #1694: LIKE fails on column with domain after ANALYZE
Re: BUG #1694: LIKE fails on column with domain after ANALYZE
List pgsql-bugs
The following bug has been logged online:

Bug reference:      1694
Logged by:          Kevin J. Grittner
Email address:      kgrittn@wicourts.gov
PostgreSQL version: 8.0.3
Operating system:   Both Windows 2000 and Linux
Description:        LIKE fails on column with domain after ANALYZE
Details:

I couldn't get this to happen without at least two columns and two rows.
The column searched with the LIKE predicate must be defined with a domain.
Things work fine until ANALYZE or VACUUM ANALYZE is run against the table.

postgres=# create domain mydomain varchar(20);
CREATE DOMAIN
postgres=# create table t1 (f1 int not null, f2 mydomain not null);
CREATE TABLE
postgres=# insert into t1 values (1, 'one');
INSERT 0 1
postgres=# insert into t1 values (2, 'two');
INSERT 0 1
postgres=# select * from t1 where f2 like 't%';
 f1 | f2
----+-----
  2 | two
(1 row)

postgres=# analyze t1;
ANALYZE
postgres=# select * from t1 where f2 like 't%';
ERROR:  unsupported type: 32740963

pgsql-bugs by date:

Previous
From: ""
Date:
Subject: BUG #1693: tsearch2 won't compile
Next
From: Michael Fuhr
Date:
Subject: Re: BUG #1692: Drop table in plpgsql