1 /*-------------------------------------------------------------------------
4 * prototypes for pquery.c.
7 * Portions Copyright (c) 1996-2025, PostgreSQL Global Development Group
8 * Portions Copyright (c) 1994, Regents of the University of California
10 * src/include/tcop/pquery.h
12 *-------------------------------------------------------------------------
17 #include "nodes/parsenodes.h"
18 #include "utils/portal.h"
20 struct PlannedStmt
; /* avoid including plannodes.h here */
23 extern PGDLLIMPORT Portal ActivePortal
;
26 extern PortalStrategy
ChoosePortalStrategy(List
*stmts
);
28 extern List
*FetchPortalTargetList(Portal portal
);
30 extern List
*FetchStatementTargetList(Node
*stmt
);
32 extern void PortalStart(Portal portal
, ParamListInfo params
,
33 int eflags
, Snapshot snapshot
);
35 extern void PortalSetResultFormat(Portal portal
, int nFormats
,
38 extern bool PortalRun(Portal portal
, long count
, bool isTopLevel
,
39 DestReceiver
*dest
, DestReceiver
*altdest
,
42 extern uint64
PortalRunFetch(Portal portal
,
43 FetchDirection fdirection
,
47 extern bool PlannedStmtRequiresSnapshot(struct PlannedStmt
*pstmt
);
49 extern void EnsurePortalSnapshotExists(void);