plpython function with dictionary as function argument? - Mailing list pgsql-general

From gherzig@fmed.uba.ar
Subject plpython function with dictionary as function argument?
Date
Msg-id 40270.157.92.152.53.1124462514.squirrel@webmail.fmed.uba.ar
Whole thread Raw
Responses Re: plpython function with dictionary as function argument?
List 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.

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: [BUGS] BUG #1830: Non-super-user must be able to copy from a
Next
From: Eugene
Date:
Subject: Re: total db lockup