Re: example of really weird caching (or whatever) problem
От | Richard Huxton |
---|---|
Тема | Re: example of really weird caching (or whatever) problem |
Дата | |
Msg-id | 4925A663.6060404@archonet.com обсуждение исходный текст |
Ответ на | Re: example of really weird caching (or whatever) problem ("Brandon Metcalf" <bmetcalf@nortel.com>) |
Ответы |
Re: example of really weird caching (or whatever) problem
|
Список | pgsql-general |
Brandon Metcalf wrote: > > OK. I understand the Perl part of what is going on. What I don't > understand is why $table in do_delete() hangs around. It seems this > is more a characteristic of how triggers work in pgsql. At any rate, > I appreciate the input since it provides me with a fix. Because it will persist until either: 1. "sub do_delete" expires 2. the whole perl interpreter expires (which then implies #1) Your trigger function will be "compiled"* just before it is first called and will then exist until #2 above happens (when you disconnect). Since your trigger function exists, that implies do_delete continues to exist which means its version of $table continues to exist. It really is exactly like that example script I attached, where the "exit" equals database end-of-session. * ok, perl is technically interpreted, except of course it isn't really, and I don't know what a better term than compiled would be. -- Richard Huxton Archonet Ltd
В списке pgsql-general по дате отправления: