command.h 1.74 KB
Newer Older
1 2
/*-------------------------------------------------------------------------
 *
3
 * command.h
4
 *	  prototypes for command.c.
5 6
 *
 *
Bruce Momjian's avatar
Add:  
Bruce Momjian committed
7 8
 * Portions Copyright (c) 1996-2000, PostgreSQL, Inc
 * Portions Copyright (c) 1994, Regents of the University of California
9
 *
10
 * $Id: command.h,v 1.22 2000/07/18 03:57:32 tgl Exp $
11 12 13 14 15 16
 *
 *-------------------------------------------------------------------------
 */
#ifndef COMMAND_H
#define COMMAND_H

17
#include "utils/portal.h"
18 19 20


/*
Bruce Momjian's avatar
Bruce Momjian committed
21
 * PerformPortalFetch
22
 *		Performs the POSTQUEL function FETCH.  Fetches count (or all if 0)
23 24 25
 * tuples in portal with name in the forward direction iff goForward.
 *
 * Exceptions:
26 27
 *		BadArg if forward invalid.
 *		"WARN" if portal not found.
28
 */
29
extern void PerformPortalFetch(char *name, bool forward, int count,
30
				   char *tag, CommandDest dest);
31 32

/*
Bruce Momjian's avatar
Bruce Momjian committed
33
 * PerformPortalClose
34
 *		Performs the POSTQUEL function CLOSE.
35
 */
36
extern void PerformPortalClose(char *name, CommandDest dest);
37

38
extern void PortalCleanup(Portal portal);
39

40
/*
41
 * ALTER TABLE variants
42
 */
43
extern void AlterTableAddColumn(const char *relationName,
44
					bool inh, ColumnDef *colDef);
45

46
extern void AlterTableAlterColumn(const char *relationName,
47 48
					  bool inh, const char *colName,
					  Node *newDefault);
49 50

extern void AlterTableDropColumn(const char *relationName,
51 52
					 bool inh, const char *colName,
					 int behavior);
53

54
extern void AlterTableAddConstraint(char *relationName,
55
						bool inh, Node *newConstraint);
56 57

extern void AlterTableDropConstraint(const char *relationName,
58 59
						 bool inh, const char *constrName,
						 int behavior);
60

61 62
extern void AlterTableCreateToastTable(const char *relationName,
                         bool silent);
Jan Wieck's avatar
TOAST  
Jan Wieck committed
63

64 65 66
/*
 * LOCK
 */
67
extern void LockTableCommand(LockStmt *lockstmt);
68

69
#endif	 /* COMMAND_H */