On Thu, Feb 8, 2018 at 7:49 PM, Robert Haas <robertmhaas@gmail.com> wrote:
> On Thu, Feb 8, 2018 at 9:04 AM, Amit Kapila <amit.kapila16@gmail.com> wrote:
>>> Also, if you're OK with not being able to do anything except fetch
>>> from the cursor until you reach the end, then couldn't you just issue
>>> the query without the cursor and use PQsetSingleRowMode?
>>
>> I think there is a lot of cursor usage via plpgsql in which it could be useful.
>
> I don't see how. If you can't do anything but fetch from the cursor
> while the cursor is open, then you can't go start doing things in
> plpgsql code either.
>
I am not saying to allow other things. I am just replying to your
question that why can't we use PQsetSingleRowMode. I mean to say that
one can fetch the data parallelly via the usage of cursors (by having
restrictions like don't allow other parallel unsafe statements) in
plpgsql.
--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com