Re: Pl/Python runtime overhead - Mailing list pgsql-general

From Peter Eisentraut
Subject Re: Pl/Python runtime overhead
Date
Msg-id 52055DF9.2010006@gmx.net
Whole thread Raw
In response to Pl/Python runtime overhead  (Seref Arikan <serefarikan@kurumsalteknoloji.com>)
Responses Re: Pl/Python runtime overhead
List pgsql-general
On 8/7/13 10:43 AM, Seref Arikan wrote:
> When a pl/python based function is invoked, does it keep a python
> runtime running across calls to same function? That is, if I use
> connection pooling, can I save on the python runtime initialization and
> loading costs?

The Python interpreter is initialized once during a session, normally
when the first PL/Python function is called.  So yes, connection pooling
can be helpful here.

> Are there any documents/books etc you'd recommend to get a good
> understanding of extending postgres with languages like python? I'd
> really like to get a good grip of the architecture of this type of
> extension, and possibly attempt to introduce a language of my own
> choosing. The docs I've seen so far are mostly too specific, making it a
> bit for hard for me to see the forest from the trees.

The basic documentation is here:
http://www.postgresql.org/docs/devel/static/plhandler.html.  The rest is
mainly experience and copying from existing language handler
implementations.



pgsql-general by date:

Previous
From: "Day, David"
Date:
Subject: Re: plpgsql FOR LOOP CTE problem ?
Next
From: Kevin Grittner
Date:
Subject: Re: bi-directional syncing help request