From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | cached plan issue in trigger func |
Date: | 2009-03-25 16:35:56 |
Message-ID: | 49CA5D6C.3080508@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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
From | Date | Subject | |
---|---|---|---|
Next Message | hubert depesz lubaczewski | 2009-03-25 16:48:59 | Re: display previous query string of idle-in-transaction |
Previous Message | Tom Lane | 2009-03-25 16:27:24 | Re: Review: B-Tree emulation for GIN |