Re: tuplestore API problem - Mailing list pgsql-hackers

From Tom Lane
Subject Re: tuplestore API problem
Date
Msg-id 23615.1238345955@sss.pgh.pa.us
Whole thread Raw
In response to Re: tuplestore API problem  (Hitoshi Harada <umi.tanuki@gmail.com>)
Responses Re: tuplestore API problem  (Hitoshi Harada <umi.tanuki@gmail.com>)
List pgsql-hackers
Hitoshi Harada <umi.tanuki@gmail.com> writes:
> 2009/3/29 Tom Lane <tgl@sss.pgh.pa.us>:
>> ... What might be a bit saner is to remember the slot last passed to
>> tuplestore_gettupleslot for each read pointer. �The implication would be
>> that we'd be assuming only one slot is used to fetch from any one read
>> pointer, but that is probably a reasonable restriction.

> Hm, this choice is better than mine. But if we take this, I suppose we
> need to consider the way to break the restriction, for the case we
> will be forced to use many TupleTableSlots on one read pointer.

I don't think we'd ever be "forced" to do that; and it would be easy to
add an Assert to tuplestore_gettupleslot to check that it gets the same
slot on each call.  Someone who needed to save previous tuples would be
advised to copy older tuples to some other slot after fetching them.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Hitoshi Harada
Date:
Subject: Re: tuplestore API problem
Next
From: Tom Lane
Date:
Subject: Re: psql \d* and system objects