From: | Tomas Szepe <szepe(at)pinerecords(dot)com> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | 8.2.2 regression with indices on user functions, 8.2.1 works |
Date: | 2007-02-06 09:10:32 |
Message-ID: | 20070206091032.GG4631@louise.pinerecords.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Hi,
Upgraded to 8.2.2 last night and had to revert to 8.2.1
first thing in the morning after hitting this problem:
A trivial update like
update mwdev set nick='Bezno-V-360';
fails with
ERROR: attribute 1 has wrong type
DETAIL: Table has type character varying, but query expects character varying.
There are no further messages in server.log.
A minimal testcase to replicate the problem follows:
$ createdb -E UNICODE testdb
CREATE DATABASE
$ (cat| psql testdb) << EOF
CREATE FUNCTION e_tolower(text) RETURNS text
AS \$_\$select translate(\$1, 'Q', 'q');\$_\$
LANGUAGE sql IMMUTABLE;
CREATE TABLE testtbl (foo character varying(16) NOT NULL);
COPY testtbl (foo) FROM stdin;
whatever
\.
CREATE UNIQUE INDEX testtbl_testidx ON testtbl
USING btree (e_tolower((foo)::text));
UPDATE testtbl SET foo='whatever2';
EOF
CREATE FUNCTION
CREATE TABLE
CREATE INDEX
ERROR: attribute 1 has wrong type
DETAIL: Table has type character varying, but query expects character varying.
$
Just putting back the old 8.2.1 binaries is enough
(the problem disappears), no need to redump/reinitdb.
System: Linux 2.6.20, x86, glibc 2.5, gcc 4.1.1.
Hope this helps,
--
Tomas Szepe <szepe(at)pinerecords(dot)com>
From | Date | Subject | |
---|---|---|---|
Next Message | Rul | 2007-02-06 09:55:19 | BUG #2972: Upgrading 8.2.1 to 8.2.2 changes port on some commands |
Previous Message | Martin Pitt | 2007-02-06 07:52:19 | BUG #2971: 8.1.7/8.2.2 break constraint checking for 'update' |