Re: storing plpython global pointer

From: Jan Urbański <wulczer(at)wulczer(dot)org>
To: Szymon Guz <mabewlun(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: storing plpython global pointer
Date: 2013-05-28 12:15:01
Message-ID: 51A49FC5.3080106@wulczer.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 28/05/13 14:04, Szymon Guz wrote:
> Hi,
> I need to store a global pointer for plpython usage. This is a PyObject*
> which can be initialized per session I think
>
> Where should I keep such a pointer?

Hi,

you probably could use a global variable, similar to PLy_interp_globals
that's defined in plpy_main.c.

Another method would be to expose the Decimal constructor in the plpy
module. You could modify plpy_plpymodule.c to import decimal and expose
the Decimal constructor as plpy.Decimal.

Best,
Jan

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Cédric Villemain 2013-05-28 12:16:38 Re: PostgreSQL 9.3 beta breaks some extensions "make install"
Previous Message Cédric Villemain 2013-05-28 12:10:14 Re: PostgreSQL 9.3 beta breaks some extensions "make install"