pquery.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*-------------------------------------------------------------------------
  2. *
  3. * pquery.h
  4. * prototypes for pquery.c.
  5. *
  6. *
  7. * Portions Copyright (c) 1996-2016, 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. extern PGDLLIMPORT Portal ActivePortal;
  19. extern PortalStrategy ChoosePortalStrategy(List *stmts);
  20. extern List *FetchPortalTargetList(Portal portal);
  21. extern List *FetchStatementTargetList(Node *stmt);
  22. extern void PortalStart(Portal portal, ParamListInfo params,
  23. int eflags, Snapshot snapshot);
  24. extern void PortalSetResultFormat(Portal portal, int nFormats,
  25. int16 *formats);
  26. extern bool PortalRun(Portal portal, long count, bool isTopLevel,
  27. DestReceiver *dest, DestReceiver *altdest,
  28. char *completionTag);
  29. extern uint64 PortalRunFetch(Portal portal,
  30. FetchDirection fdirection,
  31. long count,
  32. DestReceiver *dest);
  33. #endif /* PQUERY_H */