SPI cursor functions - Mailing list pgsql-hackers

From Tim Keitt
Subject SPI cursor functions
Date
Msg-id 6262c54c0810241433m5d30c4d6m9c31e6ccefa2d30e@mail.gmail.com
Whole thread Raw
Responses Re: SPI cursor functions
List pgsql-hackers
The docs for FETCH indicate you can fetch from the current row using
FORWARD 0, but
   SPI_scroll_cursor_fetch(someportal, FETCH_FORWARD, 0);

fails for me. Is there a way to emulate FETCH FORWARD 0 with SPI?

Also, I noticed that
  SPI_scroll_cursor_move(someportal, FETCH_BACKWARD, 1);

sets SPI_processed to 0, not 1. Is that the intended behavior? How
does one check for a failed backwards move?

Thanks.

THK

-- 
Timothy H. Keitt
University of Texas at Austin http://www.keittlab.org/
Contact info and schedule at http://www.keittlab.org/~tkeitt/
Publications http://www.keittlab.org/biblio


pgsql-hackers by date:

Previous
From: Charles Duffy
Date:
Subject: Re: Making pg_standby compression-friendly
Next
From: Guillaume Lelarge
Date:
Subject: Re: WIP : change tablespace for a database