Search Postgresql Archives

plpython function with dictionary as function argument?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux