I thought we had fixed this in 8.3:
cap=# create table t1 (t varchar(40));
CREATE TABLE
cap=# create table t2 (t varchar(40));
CREATE TABLE
cap=# create function t1trig() returns trigger language plpgsql as
$$ begin insert into t2 values(new.t); return null; end; $$;
CREATE FUNCTION
cap=# create trigger t1trigger after insert on t1 for each row
execute procedure t1trig();
CREATE TRIGGER
cap=# insert into t1 values('a');
INSERT 184789343 1
cap=# alter table t1 alter column t type text;
ALTER TABLE
cap=# alter table t2 alter column t type text;
ALTER TABLE
cap=# insert into t1 values('b');
ERROR: type of "new.t" does not match that when preparing the plan
CONTEXT: PL/pgSQL function "t1trig" line 1 at SQL statement
cap=#
cheers
andrew
--
Sent via pgsql-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers