Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



d == dev@xxxxxxxxxxxx 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

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux