The following bug has been logged online: Bug reference: 1694 Logged by: Kevin J. Grittner Email address: [EMAIL PROTECTED] 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 ---------------------------(end of broadcast)--------------------------- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match