Re: TCL trigger doesn't work after deleting a column
It seems to work for me...
create table foobar (
col1 varchar,
col2 varchar)
;
create function testfunc() returns trigger language pltcl as '
foreach id [array names NEW] {
elog NOTICE $NEW($id)
}
';
create trigger testtrig after insert or update on foobar for each row
execute procedure testfunc();
crap=# insert into foobar values ('asdf', 'asdf');
NOTICE: asdf
NOTICE: asdf
INSERT 191088282 1
crap=# alter table foobar drop column col1;
ALTER TABLE
crap=# insert into foobar values ('asdf');
NOTICE: asdf
INSERT 191088394 1
Is the column you deleted one that you referred explicitly by name in
your function?
What version are you using?
Josu� Maldonado wrote:
Show quoted text
Hello list,
The TCL trigger that uses NEW and OLD arrays failed after after I
removed a unused column, now I got this error:pltcl: Cache lookup for attribute '........pg.dropped.24........' type
0 failedI already did a vacuum, but the error remain. Any idea how to
fix/avoid that?Thanks in advance
Import Notes
Reference msg id not found: bj5ftr$2h5i$1@news.hub.org