Re: TCL trigger doesn't work after deleting a column
От | Ian Harding |
---|---|
Тема | Re: TCL trigger doesn't work after deleting a column |
Дата | |
Msg-id | 3F55F026.9000804@tpchd.org обсуждение исходный текст |
Ответ на | TCL trigger doesn't work after deleting a column (Josué Maldonado <josue@lamundial.hn>) |
Список | pgsql-general |
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: > 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 failed > > I already did a vacuum, but the error remain. Any idea how to > fix/avoid that? > > Thanks in advance >
В списке pgsql-general по дате отправления: