Re: example of really weird caching (or whatever) problem

Поиск
Список
Период
Сортировка
От Brandon Metcalf
Тема Re: example of really weird caching (or whatever) problem
Дата
Msg-id Pine.LNX.4.58L.0811201209510.13425@cash.us.nortel.com
обсуждение исходный текст
Ответ на Re: example of really weird caching (or whatever) problem  (Richard Huxton <dev@archonet.com>)
Список pgsql-general
d == dev@archonet.com writes:

 d> Brandon Metcalf wrote:
 d> >
 d> > OK.  I understand the Perl part of what is going on.  What I don't
 d> > understand is why $table in do_delete() hangs around.  It seems this
 d> > is more a characteristic of how triggers work in pgsql.  At any rate,
 d> > I appreciate the input since it provides me with a fix.

 d> Because it will persist until either:
 d> 1. "sub do_delete" expires
 d> 2. the whole perl interpreter expires (which then implies #1)

 d> Your trigger function will be "compiled"* just before it is first called
 d> and will then exist until #2 above happens (when you disconnect). Since
 d> your trigger function exists, that implies do_delete continues to exist
 d> which means its version of $table continues to exist. It really is
 d> exactly like that example script I attached, where the "exit" equals
 d> database end-of-session.

OK, that makes sense.

 d> * ok, perl is technically interpreted, except of course it isn't really,
 d> and I don't know what a better term than compiled would be.

No, you're right.  It is compiled before being executed, but not in
the sense that C code is compiled.


--
Brandon

В списке pgsql-general по дате отправления:

Предыдущее
От: Richard Huxton
Дата:
Сообщение: Re: example of really weird caching (or whatever) problem
Следующее
От: Craig Ringer
Дата:
Сообщение: Re: join with redundant results VS simpler join plus multiple selects