Skip site navigation (1) Skip section navigation (2)

Re: [GENERAL] plpyhton

From: Joshua Tolley <eggyknap(at)gmail(dot)com>
To: c k <shreeseva(dot)learning(at)gmail(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org, pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] plpyhton
Date: 2010-11-25 05:42:55
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-adminpgsql-general
On Wed, Nov 24, 2010 at 11:56:16AM +0530, c k wrote:
> Hello,
> Does calling a pl/python function from each database connection load the
> python interpreter each time? what are the effects of using pl/python
> function in a environment where no. of concurrent connections are more and
> each user calls a pl/python function?
> Please give the details about how pl/python functions are executed.
> Thanks and regards,

I don't know plpython terribly well, but for most PLs, calling them once in a
session loads any interpreter they require. That interpreter remains loaded
for the duration of the session. So each individual connection will load its
own interpreter, once, at the time of the first function call requiring that
interpreter. Most widely used languages also cache various bits of important
information about the functions you run, the first time you run them in a
session, to avoid needing to look up or calculate that information again when
you run the function next time.

Joshua Tolley / eggyknap
End Point Corporation

In response to


pgsql-admin by date

Next:From: Guillaume LelargeDate: 2010-11-25 07:37:28
Subject: Re: managing access to database
Previous:From: James CloosDate: 2010-11-24 20:59:30
Subject: Re: binary logs: a location other than pg_xlog??

pgsql-general by date

Next:From: Joshua TolleyDate: 2010-11-25 05:48:18
Subject: Re: diagram tools?
Previous:From: Troy RasiahDate: 2010-11-25 05:34:43
Subject: Use of search path in plpgsql functions, PG 8.3.12

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group