Enable pl/python to return records based on multiple OUT params - Mailing list pgsql-hackers

From Hannu Krosing
Subject Enable pl/python to return records based on multiple OUT params
Date
Msg-id 1225512810.8122.7.camel@huvostro
Whole thread Raw
Responses Re: Enable pl/python to return records based on multiple OUT params  (Hannu Krosing <hannu@2ndQuadrant.com>)
List pgsql-hackers
attached is a patch which enables plpython to recognize function with
multiple OUT params as returning a record


py=# create or replace function addsub( in i1 int, in i2 int,
py=#   out o1 int, out o2 int) as
py=# $$
py$# return i1 + i2, i1-i2
py$# $$  language plpythonu;
CREATE FUNCTION
py=#
py=# select * from addsub(1,2);
 o1 | o2
----+----
  3 | -1
(1 row)


This version is quite rough, though passes tests here.

I will clean it up more during commitfest.

--
------------------------------------------
Hannu Krosing   http://www.2ndQuadrant.com
PostgreSQL Scalability and Availability
   Services, Consulting and Training

Attachment

pgsql-hackers by date:

Previous
From: KaiGai Kohei
Date:
Subject: Re: Please make sure your patches are on the wiki page
Next
From: Ron Mayer
Date:
Subject: Re: Re: Updated interval patches (SQL std output, ISO8601 intervals, and interval rounding)