Re: pg_proc probin misuse - Mailing list pgsql-hackers

From Tom Lane
Subject Re: pg_proc probin misuse
Date
Msg-id 13001.1148910842@sss.pgh.pa.us
Whole thread Raw
In response to Re: pg_proc probin misuse  (PFC <lists@peufeu.com>)
Responses Re: pg_proc probin misuse  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
PFC <lists@peufeu.com> writes:
>> If it were really expensive to derive bytecode from source text
>> then maybe it'd make sense to do what you're doing, but surely that's
>> not all that expensive.  Everyone else manages to parse prosrc on the
>> fly and cache the result in memory; why isn't plpython doing that?

>     It depends on the number of imported modules in the function. If it  
> imports a lot of modules, it can take some time to compile a python  
> function (especially if the modules have some initialisation code which  
> must be run on import).

Surely the initialization code would have to be run anyway ... and if
the function does import a pile of modules, do you really want to cache
all that in its pg_proc entry?  What happens if some of the modules get
updated later?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: some question about deadlock
Next
From: Tom Lane
Date:
Subject: Re: non-transactional pg_class