pathnode->tidquals = tidquals;
-#ifdef XCP
set_scanpath_distribution(root, rel, (Path *) pathnode);
- /* We may need to pass info about target node to support */
- if (pathnode->path.distribution)
- elog(ERROR, "could not perform TID scan on remote relation");
-#endif
cost_tidscan(&pathnode->path, root, rel, tidquals,
pathnode->path.param_info);
(errcode(ERRCODE_INVALID_CURSOR_DEFINITION),
errmsg("cannot specify both SCROLL and NO SCROLL")));
+ /* Always disable FQS on cursors */
+ stmt->options |= CURSOR_OPT_NO_FQS;
+
/* Transform contained query, not allowing SELECT INTO */
query = transformStmt(pstate, stmt->query);
stmt->query = (Node *) query;
if (cursorOptions & CURSOR_OPT_SCROLL)
return NULL;
+ /* Do not FQS cursor statements at all */
+ if (cursorOptions & CURSOR_OPT_NO_FQS)
+ return NULL;
+
/* Do not FQS EXEC DIRECT statements */
if (query->utilityStmt && IsA(query->utilityStmt, RemoteQuery))
{
#define CURSOR_OPT_GENERIC_PLAN 0x0040 /* force use of generic plan */
#define CURSOR_OPT_CUSTOM_PLAN 0x0080 /* force use of custom plan */
#define CURSOR_OPT_PARALLEL_OK 0x0100 /* parallel mode OK */
+#define CURSOR_OPT_NO_FQS 0x0200 /* do not use FQS */
typedef struct DeclareCursorStmt
{