The following bug has been logged online: Bug reference: 2974 Logged by: Michal Schwarz Email address: [EMAIL PROTECTED] PostgreSQL version: 8.1.7 Operating system: Fedora Core 6 Description: broken CHECK constraint with varchar Details:
CREATE TABLE t (c VARCHAR(20)); ALTER TABLE t ADD CONSTRAINT xyz CHECK (c IN ('A','B','C')); INSERT INTO t VALUES ('A'); Results: ERROR: attribute 1 has wrong type DETAIL: Table has type character varying, but query expects character varying. In previous versions, everything worked correctly. Problem arised in 8.1.7 (maybe only in Fedora release???). When i returned back to 8.1.6, everything worked again. ---------------------------(end of broadcast)--------------------------- TIP 7: You can help support the PostgreSQL project by donating at http://www.postgresql.org/about/donate