plpython function with dictionary as function argument?

From: gherzig(at)fmed(dot)uba(dot)ar
To: pgsql-general(at)postgresql(dot)org
Subject: plpython function with dictionary as function argument?
Date: 2005-08-19 14:41:54
Message-ID: 40270.157.92.152.53.1124462514.squirrel@webmail.fmed.uba.ar
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi all. I need to know if it is possible to call a plpython stored funcion
with an dictionary as single argument:

Suppose this python structure:

someDict = {
'field1': 'Foo',
'creepyfield': 'Bar'
}

The data base connection
CONN = pg.connect()....

I want some pypgslq function

CREATE myfunction ( __dictionary__) returns void
AS
.... (process)
LANGUAGE pythonu

and (the desired goal) be able to execute
CONN.execute("select * from myfunction (someDict)")

It this possible?

Thanks!!
--
Gerardo Herzig
Direccion General de Organizacion y Sistemas
Facultad de Medicina
U.B.A.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Eugene 2005-08-19 14:54:35 Re: total db lockup
Previous Message Tom Lane 2005-08-19 14:38:32 Re: [GENERAL] BUG #1830: Non-super-user must be able to copy from a