OSDN Git Service

Arrange to copy relcache's trigdesc structure at the start of any
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 14 Oct 2002 16:51:30 +0000 (16:51 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 14 Oct 2002 16:51:30 +0000 (16:51 +0000)
commit8f2a289d78a0f12ec82be77d56947cf383ee58dd
tree756f492635939109fdbda2b56de558db0d840819
parent8fc1f413f41242df1b9060670af8d2352a0e93b0
Arrange to copy relcache's trigdesc structure at the start of any
query that uses it.  This ensures that triggers will be applied consistently
throughout a query even if someone commits changes to the relation's
pg_class.reltriggers field meanwhile.  Per crash report from Laurette Cisneros.
While at it, simplify memory management in relcache.c, which no longer
needs the old hack to try to keep trigger info in the same place over
a relcache entry rebuild.  (Should try to fix rd_att and rewrite-rule
access similarly, someday.)  And make RelationBuildTriggers simpler and
more robust by making it build the trigdesc in working memory and then
CopyTriggerDesc() into cache memory.
src/backend/commands/copy.c
src/backend/commands/trigger.c
src/backend/executor/execMain.c
src/backend/utils/cache/relcache.c
src/include/commands/trigger.h