From: | Nuno Mota <nmota(at)net-bo(dot)com> |
---|---|
To: | Adrian Klaver <aklaver(at)comcast(dot)net> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: plpython return setof and yield |
Date: | 2009-08-17 18:58:11 |
Message-ID: | d79bf9b30908171158l1e8d61e2s6a7f6e2d1b8fdba7@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Ok, now I think I understand since I already have a result set from the
query I cannot use yield.
The other example works because I am generating only one result set.
On Mon, Aug 17, 2009 at 7:55 PM, Nuno Mota <nmota(at)net-bo(dot)com> wrote:
> I have fixed the problem populating a list and returning it.
>
> Well I guess I have to learn a litte bit more of python to understand how
> to use yield when using multiple result sets.
>
> Thank you anyway
>
>
> On Mon, Aug 17, 2009 at 7:23 PM, Adrian Klaver <aklaver(at)comcast(dot)net>wrote:
>
>>
>>
>> ----- "Nuno Mota" <nmota(at)net-bo(dot)com> wrote:
>>
>> > Thank you very much,
>> >
>> > Can i ask one more question ?
>> >
>> > How do I declare the correct result set to return, this in first
>> > example code, is it possible ?
>> >
>> > Thank you again,
>> > Nuno Mota
>> >
>> >
>>
>> From here:
>> http://www.postgresql.org/docs/8.3/interactive/plpython-funcs.html
>>
>> "The result is returned from the Python code in the usual way, with return
>> or yield (in case of a result-set statement). "
>>
>>
>> Adrian Klaver
>> aklaver(at)comcast(dot)net
>>
>
>
>
> --
> Nuno Mota <nmota(at)net-bo(dot)com>
>
> Management Solutions for POS
> Tlf: 351 225322000
> Mob: 351 936272176
> Fax: 351 226177662
> http://www.net-bo.com
>
--
Nuno Mota <nmota(at)net-bo(dot)com>
Management Solutions for POS
Tlf: 351 225322000
Mob: 351 936272176
Fax: 351 226177662
http://www.net-bo.com
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2009-08-17 18:59:41 | Re: ERROR: attempted to delete invisible tuple |
Previous Message | Nuno Mota | 2009-08-17 18:55:50 | Re: plpython return setof and yield |