X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id AC4A35291A for ; Fri, 19 Aug 2005 10:32:02 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 77496-06 for ; Fri, 19 Aug 2005 13:31:54 +0000 (GMT) Received: from fmed.uba.ar (mail.fmed.uba.ar [157.92.152.1]) by svr1.postgresql.org (Postfix) with ESMTP id 91C3E52E27 for ; Fri, 19 Aug 2005 10:31:51 -0300 (ADT) Received: from webmail.fmed.uba.ar (localhost [127.0.0.1]) by fmed.uba.ar (Postfix) with SMTP id ED8F6202AD; Fri, 19 Aug 2005 10:34:56 -0300 (ART) Received: from 157.92.152.53 (proxying for unknown) (SquirrelMail authenticated user gherzig) by webmail.fmed.uba.ar with HTTP; Fri, 19 Aug 2005 10:34:56 -0300 (ART) Message-ID: <49662.157.92.152.53.1124458496.squirrel@webmail.fmed.uba.ar> In-Reply-To: <20050819132207.GA83693@winnie.fuhr.org> References: <44856.157.92.152.53.1124457200.squirrel@webmail.fmed.uba.ar> <20050819132207.GA83693@winnie.fuhr.org> Date: Fri, 19 Aug 2005 10:34:56 -0300 (ART) Subject: Re: [SOT] pypgsql function receiving dictionary as parameter? From: gherzig@fmed.uba.ar To: "Michael Fuhr" Cc: pgsql-sql@postgresql.org User-Agent: SquirrelMail/1.4.2 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 Importance: Normal X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.178 required=5 tests=[AWL=0.000, NO_REAL_NAME=0.178] X-Spam-Level: X-Archive-Number: 200508/171 X-Sequence-Number: 22399 Suppose this python structure: someDict = { 'field1': 'Foo', 'creepyfield': 'Bar' } and the connection to the database 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)") Thanks again, and yes, i might post to the others postgres list too. -- Gerardo Herzig Direccion General de Organizacion y Sistemas Facultad de Medicina U.B.A. > On Fri, Aug 19, 2005 at 10:13:20AM -0300, gherzig@fmed.uba.ar wrote: >> Hi all. Im a python programer, and im trying to use a dictionary >> (associative array on Perl) in my pypgsql function without result. >> Anybody >> know if it is possible? > > Please show a minimal but complete example of what you're trying to do. > > BTW, pgsql-sql is supposed to be for SQL-related matters; this thread > would be more appropriate in pgsql-general or pgsql-interfaces. > > -- > Michael Fuhr > >