From: | Merlin Moncure <mmoncure(at)gmail(dot)com> |
---|---|
To: | Atri Sharma <atri(dot)jiit(at)gmail(dot)com> |
Cc: | Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: ExecStoreTuple going into infinite loop |
Date: | 2012-06-06 13:47:33 |
Message-ID: | CAHyXU0zVHjtvU+jHhy7wrDTvtHkpp68KUS=qArsWakH_QmtrKA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Jun 6, 2012 at 5:36 AM, Atri Sharma <atri(dot)jiit(at)gmail(dot)com> wrote:
> Hi all,
>
> I am trying to build and store multiple tuples.The code is:
>
> ExecClearTuple(slot);
>
> /The code for fetching the data from which tuple will be formed../
> for(;x<y;x++){
> tuple = BuildTupleFromCStrings(TupleDescGetAttInMetadata(node->ss.ss_currentRelation->rd_att),
> values);
> ExecStoreTuple(tuple, slot, InvalidBuffer, false);
> }
>
> return (slot);
>
>
> When I am including the ExecClearTuple(slot),the result only includes
> the last tuple that was built.If I do not include
> ExecClearTuple(slot),the code goes into an infinite loop.
>
> Please help.
I've answered off list. The context here is fdw iteration. Atri was
trying to return multiple rows inside the iteration which is not how
the function is designed to work. (also this would be more
appropriate question for -general).
merlin
From | Date | Subject | |
---|---|---|---|
Next Message | Honza Horak | 2012-06-06 13:50:56 | Ability to listen on two unix sockets |
Previous Message | Sergey Koposov | 2012-06-06 11:27:11 | Re: 9.2beta1, parallel queries, ReleasePredicateLocks, CheckForSerializableConflictIn in the oprofile |