pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
[SOT] pypgsql function receiving dictionary as parameter?
3+ messages / 2 participants
[nested] [flat]

* [SOT] pypgsql function receiving dictionary as parameter?
@ 2005-08-19 13:13 gherzig@fmed.uba.ar
  2005-08-19 13:22 ` Re: [SOT] pypgsql function receiving dictionary as parameter? Michael Fuhr <mike@fuhr.org>
  0 siblings, 1 reply; 3+ messages in thread

From: gherzig@fmed.uba.ar @ 2005-08-19 13:13 UTC (permalink / raw)
  To: pgsql-sql

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?

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



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: [SOT] pypgsql function receiving dictionary as parameter?
  2005-08-19 13:13 [SOT] pypgsql function receiving dictionary as parameter? gherzig@fmed.uba.ar
@ 2005-08-19 13:22 ` Michael Fuhr <mike@fuhr.org>
  2005-08-19 13:34   ` Re: [SOT] pypgsql function receiving dictionary as parameter? gherzig@fmed.uba.ar
  0 siblings, 1 reply; 3+ messages in thread

From: Michael Fuhr @ 2005-08-19 13:22 UTC (permalink / raw)
  To: gherzig@fmed.uba.ar; +Cc: pgsql-sql

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



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: [SOT] pypgsql function receiving dictionary as parameter?
  2005-08-19 13:13 [SOT] pypgsql function receiving dictionary as parameter? gherzig@fmed.uba.ar
  2005-08-19 13:22 ` Re: [SOT] pypgsql function receiving dictionary as parameter? Michael Fuhr <mike@fuhr.org>
@ 2005-08-19 13:34   ` gherzig@fmed.uba.ar
  0 siblings, 0 replies; 3+ messages in thread

From: gherzig@fmed.uba.ar @ 2005-08-19 13:34 UTC (permalink / raw)
  To: Michael Fuhr <mike@fuhr.org>; +Cc: pgsql-sql

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
>
>





^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2005-08-19 13:34 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-08-19 13:13 [SOT] pypgsql function receiving dictionary as parameter? gherzig@fmed.uba.ar
2005-08-19 13:22 ` Michael Fuhr <mike@fuhr.org>
2005-08-19 13:34   ` gherzig@fmed.uba.ar

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox