how to returns set of records in PL/python - Mailing list pgsql-sql

From Anoop G
Subject how to returns set of records in PL/python
Date
Msg-id 1a027d210804070547w3117f195qa279b487b896674d@mail.gmail.com
Whole thread Raw
Responses Re: how to returns set of records in PL/python
Re: how to returns set of records in PL/python
List pgsql-sql
Hi ,<br /><br />  Iam new to plpython,how can I return a  recordset from a plpython function?<br /><br />  Is there is
anyway give me an example;<br /><br />  <br />plpgsql function <br />--------------------------------<br /><br />CREATE
ORREPLACE FUNCTION function_to_get_all_countries() RETURNS SETOF RECORD AS $BODY$<br /> DECLARE    <br /><br />    r
RECORD;  <br />     <br />BEGIN<br /><br />    FOR r IN SELECT  pk_bint_country_id,vchr_country FROM tbl_country
LOOP<br/>        RETURN NEXT r;<br />        END LOOP;<br />    RETURN;<br /><br />END<br />$BODY$ LANGUAGE
'plpgsql';<br/><br /><br /><br /><br />How i can get the same result using plpythonu and how I can call the function
(isthere any user defined type required like in plpgsql)?<br /><br />Thanks in advance<br /><br />Anoop<br /> 

pgsql-sql by date:

Previous
From: "luke\.78\@libero\.it"
Date:
Subject: Commit every processed record
Next
From: "A. Kretschmer"
Date:
Subject: Re: Commit every processed record