codekingpro/portable-devtools
115k
1/*-------------------------------------------------------------------------2 *3 * pquery.h4 * prototypes for pquery.c.5 *6 *7 * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group8 * Portions Copyright (c) 1994, Regents of the University of California9 *10 * src/include/tcop/pquery.h11 *12 *-------------------------------------------------------------------------13 */14#ifndef PQUERY_H15#define PQUERY_H16 17#include "nodes/parsenodes.h"18#include "utils/portal.h"19 20struct PlannedStmt; /* avoid including plannodes.h here */21 22 23extern PGDLLIMPORT Portal ActivePortal;24 25 26extern PortalStrategy ChoosePortalStrategy(List *stmts);27 28extern List *FetchPortalTargetList(Portal portal);29 30extern List *FetchStatementTargetList(Node *stmt);31 32extern void PortalStart(Portal portal, ParamListInfo params,33 int eflags, Snapshot snapshot);34 35extern void PortalSetResultFormat(Portal portal, int nFormats,36 int16 *formats);37 38extern bool PortalRun(Portal portal, long count, bool isTopLevel,39 bool run_once, DestReceiver *dest, DestReceiver *altdest,40 QueryCompletion *qc);41 42extern uint64 PortalRunFetch(Portal portal,43 FetchDirection fdirection,44 long count,45 DestReceiver *dest);46 47extern bool PlannedStmtRequiresSnapshot(struct PlannedStmt *pstmt);48 49extern void EnsurePortalSnapshotExists(void);50 51#endif /* PQUERY_H */52 