BUG #2974: broken CHECK constraint with varchar

From: "Michal Schwarz" <misch(at)czechin(dot)cz>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #2974: broken CHECK constraint with varchar
Date: 2007-02-07 07:40:31
Message-ID: 200702070740.l177eVb7071125@wwwmaster.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 2974
Logged by: Michal Schwarz
Email address: misch(at)czechin(dot)cz
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.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tomas Szepe 2007-02-07 07:57:00 Re: 8.2.2 regression with indices on user functions, 8.2.1 works
Previous Message Gary Chambers 2007-02-07 01:20:08 Re: BUG #2962: 8.2.1 lo_creat Documentation incorrect?