1
/*-------------------------------------------------------------------------
4
* POSTGRES define and remove utility definitions.
7
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
8
* Portions Copyright (c) 1994, Regents of the University of California
10
* $PostgreSQL: pgsql/src/include/commands/defrem.h,v 1.62 2004-12-31 22:03:28 pgsql Exp $
12
*-------------------------------------------------------------------------
17
#include "nodes/parsenodes.h"
20
/* commands/indexcmds.c */
21
extern void DefineIndex(RangeVar *heapRelation,
22
char *indexRelationName,
23
char *accessMethodName,
35
extern void RemoveIndex(RangeVar *relation, DropBehavior behavior);
36
extern void ReindexIndex(RangeVar *indexRelation, bool force);
37
extern void ReindexTable(RangeVar *relation, bool force);
38
extern void ReindexDatabase(const char *databaseName, bool force, bool all);
39
extern char *makeObjectName(const char *name1, const char *name2,
41
extern char *ChooseRelationName(const char *name1, const char *name2,
42
const char *label, Oid namespace);
44
/* commands/functioncmds.c */
45
extern void CreateFunction(CreateFunctionStmt *stmt);
46
extern void RemoveFunction(RemoveFuncStmt *stmt);
47
extern void RemoveFunctionById(Oid funcOid);
48
extern void SetFunctionReturnType(Oid funcOid, Oid newRetType);
49
extern void SetFunctionArgType(Oid funcOid, int argIndex, Oid newArgType);
50
extern void RenameFunction(List *name, List *argtypes, const char *newname);
51
extern void AlterFunctionOwner(List *name, List *argtypes, AclId newOwnerSysId);
52
extern void CreateCast(CreateCastStmt *stmt);
53
extern void DropCast(DropCastStmt *stmt);
54
extern void DropCastById(Oid castOid);
56
/* commands/operatorcmds.c */
57
extern void DefineOperator(List *names, List *parameters);
58
extern void RemoveOperator(RemoveOperStmt *stmt);
59
extern void RemoveOperatorById(Oid operOid);
60
extern void AlterOperatorOwner(List *name, TypeName *typeName1,
61
TypeName *typename2, AclId newOwnerSysId);
63
/* commands/aggregatecmds.c */
64
extern void DefineAggregate(List *names, List *parameters);
65
extern void RemoveAggregate(RemoveAggrStmt *stmt);
66
extern void RenameAggregate(List *name, TypeName *basetype, const char *newname);
67
extern void AlterAggregateOwner(List *name, TypeName *basetype, AclId newOwnerSysId);
69
/* commands/opclasscmds.c */
70
extern void DefineOpClass(CreateOpClassStmt *stmt);
71
extern void RemoveOpClass(RemoveOpClassStmt *stmt);
72
extern void RemoveOpClassById(Oid opclassOid);
73
extern void RenameOpClass(List *name, const char *access_method, const char *newname);
74
extern void AlterOpClassOwner(List *name, const char *access_method, AclId newOwnerSysId);
76
/* support routines in commands/define.c */
78
extern char *case_translate_language_name(const char *input);
80
extern char *defGetString(DefElem *def);
81
extern double defGetNumeric(DefElem *def);
82
extern bool defGetBoolean(DefElem *def);
83
extern int64 defGetInt64(DefElem *def);
84
extern List *defGetQualifiedName(DefElem *def);
85
extern TypeName *defGetTypeName(DefElem *def);
86
extern int defGetTypeLength(DefElem *def);