Hi Tom,
Tom Lane [2007-02-06 11:25 -0500]:
> "Martin Pitt" <martin@piware.de> writes:
> > db> create table foo (bar VARCHAR(20) NOT NULL check (bar in
> > ('FOO','BAR')));
> > CREATE TABLE
>=20
> > db> insert into foo (bar) values ('FOO');
> > INSERT 0 1
>=20
> > db> update foo set bar =3D 'BAR';
> > ERROR: attribute 1 has wrong type
> > DETAIL: Table has type character varying, but query expects character v=
arying.
>=20
> 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
--=20
Martin Pitt http://www.piware.de
Ubuntu Developer http://www.ubuntu.com
Debian Developer http://www.debian.org