2
0

pquery.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*-------------------------------------------------------------------------
  2. *
  3. * pquery.h
  4. * prototypes for pquery.c.
  5. *
  6. *
  7. * Portions Copyright (c) 1996-2022, 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. #include "nodes/parsenodes.h"
  17. #include "utils/portal.h"
  18. struct PlannedStmt; /* avoid including plannodes.h here */
  19. extern PGDLLIMPORT Portal ActivePortal;
  20. extern PortalStrategy ChoosePortalStrategy(List *stmts);
  21. extern List *FetchPortalTargetList(Portal portal);
  22. extern List *FetchStatementTargetList(Node *stmt);
  23. extern void PortalStart(Portal portal, ParamListInfo params,
  24. int eflags, Snapshot snapshot);
  25. extern void PortalSetResultFormat(Portal portal, int nFormats,
  26. int16 *formats);
  27. extern bool PortalRun(Portal portal, long count, bool isTopLevel,
  28. bool run_once, DestReceiver *dest, DestReceiver *altdest,
  29. QueryCompletion *qc);
  30. extern uint64 PortalRunFetch(Portal portal,
  31. FetchDirection fdirection,
  32. long count,
  33. DestReceiver *dest);
  34. extern bool PlannedStmtRequiresSnapshot(struct PlannedStmt *pstmt);
  35. extern void EnsurePortalSnapshotExists(void);
  36. #endif /* PQUERY_H */