From the Postgresql documentation:
int cursorOptions
Integer bit mask of cursor options; zero produces default behavior.
What is the default behavior? Where is a complete list of cursor options? I’ve been looking through the documentation for an hour now. Can someone provide a link or point me in the right direction?
I am compiling a list of
cursorOptionsas I peel through the documentation to help save the others the trouble.Defined in
<src/include/nodes/parsenodes.h>:CURSOR_OPT_BINARY(0x0001)CURSOR_OPT_SCROLL(0x0002) is required by several SPI commands. Setting this option will allow for more complex movement through cursors. Further details are explained in the documentation ofSPI_cursor_fetch,SPI_cursor_move,SPI_scroll_cursor_fetch,SPI_scroll_cursor_moveCURSOR_OPT_NO_SCROLL(0x0004)CURSOR_OPT_INSENSITIVE(0x0008)CURSOR_OPT_HOLD(0x0010) is ignored bySPI_prepare_cursor. However, it’s behavior forSPI_prepare_paramsandSPI_cursor_open_with_argsis not specified in the documentation.CURSOR_OPT_CUSTOM_PLAN(0x0020)CURSOR_OPT_FAST_PLAN(0x0040)CURSOR_OPT_GENERIC_PLAN(0x0080)NOTE: If anyone with the ability to edit posts wishes to contribute to this answer (additional options, functionality or insights), please feel free to do so. I will try to move comments up into the answer as they come.