pquery.h 1.17 KB
Newer Older
1 2
/*-------------------------------------------------------------------------
 *
3
 * pquery.h
4
 *	  prototypes for pquery.c.
5 6
 *
 *
7
 * Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
Bruce Momjian's avatar
Add:  
Bruce Momjian committed
8
 * Portions Copyright (c) 1994, Regents of the University of California
9
 *
10
 * $PostgreSQL: pgsql/src/include/tcop/pquery.h,v 1.43 2007/07/25 12:22:54 mha Exp $
11 12 13 14 15 16
 *
 *-------------------------------------------------------------------------
 */
#ifndef PQUERY_H
#define PQUERY_H

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 27
extern List *FetchPortalTargetList(Portal portal);

28 29
extern List *FetchStatementTargetList(Node *stmt);

30
extern void PortalStart(Portal portal, ParamListInfo params,
31
			Snapshot snapshot);
32

33
extern void PortalSetResultFormat(Portal portal, int nFormats,
Bruce Momjian's avatar
Bruce Momjian committed
34
					  int16 *formats);
35

36
extern bool PortalRun(Portal portal, long count, bool isTopLevel,
Bruce Momjian's avatar
Bruce Momjian committed
37 38
		  DestReceiver *dest, DestReceiver *altdest,
		  char *completionTag);
39

40
extern long PortalRunFetch(Portal portal,
Bruce Momjian's avatar
Bruce Momjian committed
41
			   FetchDirection fdirection,
42
			   long count,
Bruce Momjian's avatar
Bruce Momjian committed
43
			   DestReceiver *dest);
44

45
#endif   /* PQUERY_H */