From: | Martin Pitt <martin(at)piware(dot)de> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: BUG #2971: 8.1.7/8.2.2 break constraint checking for 'update' |
Date: | 2007-02-06 18:14:28 |
Message-ID: | 20070206181428.GP9481@piware.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Hi Tom,
Tom Lane [2007-02-06 11:25 -0500]:
> "Martin Pitt" <martin(at)piware(dot)de> writes:
> > db> create table foo (bar VARCHAR(20) NOT NULL check (bar in
> > ('FOO','BAR')));
> > CREATE TABLE
>
> > db> insert into foo (bar) values ('FOO');
> > INSERT 0 1
>
> > db> update foo set bar = 'BAR';
> > ERROR: attribute 1 has wrong type
> > DETAIL: Table has type character varying, but query expects character varying.
>
> Sigh. The trouble with security patches is that by nature they can't
> get very wide testing :-(. I think we shall have to do something like
> the attached. Arguably this problem is exposing bugs elsewhere in the
> system, but for now ExecEvalVar() is going to have to be less
> aggressive.
I confirm that this patch fixes the problem.
Thanks for the fast reaction!
Martin
--
Martin Pitt http://www.piware.de
Ubuntu Developer http://www.ubuntu.com
Debian Developer http://www.debian.org
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas | 2007-02-06 20:10:52 | BUG #2973: Compile Error with MIPSpro compiler |
Previous Message | Martin Pitt | 2007-02-06 17:45:01 | Re: Strange "Table has type character varying, but query expects character varying" errors |