| 1 | /*------------------------------------------------------------------------- |
| 2 | * |
| 3 | * pquery.h |
| 4 | * prototypes for pquery.c. |
| 5 | * |
| 6 | * |
| 7 | * Portions Copyright (c) 1996-2019, PostgreSQL Global Development Group |
| 8 | * Portions Copyright (c) 1994, Regents of the University of California |
| 9 | * |
| 10 | * src/include/tcop/pquery.h |
| 11 | * |
| 12 | *------------------------------------------------------------------------- |
| 13 | */ |
| 14 | #ifndef PQUERY_H |
| 15 | #define PQUERY_H |
| 16 | |
| 17 | #include "nodes/parsenodes.h" |
| 18 | #include "utils/portal.h" |
| 19 | |
| 20 | |
| 21 | extern PGDLLIMPORT Portal ActivePortal; |
| 22 | |
| 23 | |
| 24 | extern PortalStrategy ChoosePortalStrategy(List *stmts); |
| 25 | |
| 26 | extern List *FetchPortalTargetList(Portal portal); |
| 27 | |
| 28 | extern List *FetchStatementTargetList(Node *stmt); |
| 29 | |
| 30 | extern void PortalStart(Portal portal, ParamListInfo params, |
| 31 | int eflags, Snapshot snapshot); |
| 32 | |
| 33 | extern void PortalSetResultFormat(Portal portal, int nFormats, |
| 34 | int16 *formats); |
| 35 | |
| 36 | extern bool PortalRun(Portal portal, long count, bool isTopLevel, |
| 37 | bool run_once, DestReceiver *dest, DestReceiver *altdest, |
| 38 | char *completionTag); |
| 39 | |
| 40 | extern uint64 PortalRunFetch(Portal portal, |
| 41 | FetchDirection fdirection, |
| 42 | long count, |
| 43 | DestReceiver *dest); |
| 44 | |
| 45 | #endif /* PQUERY_H */ |
| 46 | |