Fix xslt_process() to ensure that it inserts a NULL terminator after the
[PostgreSQL.git] / src / include / commands / defrem.h
blob4356492c97541e8a69add4745835fe28416718a5
1 /*-------------------------------------------------------------------------
3 * defrem.h
4 * POSTGRES define and remove utility definitions.
7 * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group
8 * Portions Copyright (c) 1994, Regents of the University of California
10 * $PostgreSQL$
12 *-------------------------------------------------------------------------
14 #ifndef DEFREM_H
15 #define DEFREM_H
17 #include "nodes/parsenodes.h"
20 /* commands/indexcmds.c */
21 extern void DefineIndex(RangeVar *heapRelation,
22 char *indexRelationName,
23 Oid indexRelationId,
24 char *accessMethodName,
25 char *tableSpaceName,
26 List *attributeList,
27 Expr *predicate,
28 List *options,
29 bool unique,
30 bool primary,
31 bool isconstraint,
32 bool is_alter_table,
33 bool check_rights,
34 bool skip_build,
35 bool quiet,
36 bool concurrent);
37 extern void ReindexIndex(RangeVar *indexRelation);
38 extern void ReindexTable(RangeVar *relation);
39 extern void ReindexDatabase(const char *databaseName,
40 bool do_system, bool do_user);
41 extern char *makeObjectName(const char *name1, const char *name2,
42 const char *label);
43 extern char *ChooseRelationName(const char *name1, const char *name2,
44 const char *label, Oid namespace);
45 extern Oid GetDefaultOpClass(Oid type_id, Oid am_id);
47 /* commands/functioncmds.c */
48 extern void CreateFunction(CreateFunctionStmt *stmt, const char *queryString);
49 extern void RemoveFunction(RemoveFuncStmt *stmt);
50 extern void RemoveFunctionById(Oid funcOid);
51 extern void SetFunctionReturnType(Oid funcOid, Oid newRetType);
52 extern void SetFunctionArgType(Oid funcOid, int argIndex, Oid newArgType);
53 extern void RenameFunction(List *name, List *argtypes, const char *newname);
54 extern void AlterFunctionOwner(List *name, List *argtypes, Oid newOwnerId);
55 extern void AlterFunctionOwner_oid(Oid procOid, Oid newOwnerId);
56 extern void AlterFunction(AlterFunctionStmt *stmt);
57 extern void CreateCast(CreateCastStmt *stmt);
58 extern void DropCast(DropCastStmt *stmt);
59 extern void DropCastById(Oid castOid);
60 extern void AlterFunctionNamespace(List *name, List *argtypes, bool isagg,
61 const char *newschema);
63 /* commands/operatorcmds.c */
64 extern void DefineOperator(List *names, List *parameters);
65 extern void RemoveOperator(RemoveFuncStmt *stmt);
66 extern void RemoveOperatorById(Oid operOid);
67 extern void AlterOperatorOwner(List *name, TypeName *typeName1,
68 TypeName *typename2, Oid newOwnerId);
69 extern void AlterOperatorOwner_oid(Oid operOid, Oid newOwnerId);
71 /* commands/aggregatecmds.c */
72 extern void DefineAggregate(List *name, List *args, bool oldstyle,
73 List *parameters);
74 extern void RemoveAggregate(RemoveFuncStmt *stmt);
75 extern void RenameAggregate(List *name, List *args, const char *newname);
76 extern void AlterAggregateOwner(List *name, List *args, Oid newOwnerId);
78 /* commands/opclasscmds.c */
79 extern void DefineOpClass(CreateOpClassStmt *stmt);
80 extern void DefineOpFamily(CreateOpFamilyStmt *stmt);
81 extern void AlterOpFamily(AlterOpFamilyStmt *stmt);
82 extern void RemoveOpClass(RemoveOpClassStmt *stmt);
83 extern void RemoveOpFamily(RemoveOpFamilyStmt *stmt);
84 extern void RemoveOpClassById(Oid opclassOid);
85 extern void RemoveOpFamilyById(Oid opfamilyOid);
86 extern void RemoveAmOpEntryById(Oid entryOid);
87 extern void RemoveAmProcEntryById(Oid entryOid);
88 extern void RenameOpClass(List *name, const char *access_method, const char *newname);
89 extern void RenameOpFamily(List *name, const char *access_method, const char *newname);
90 extern void AlterOpClassOwner(List *name, const char *access_method, Oid newOwnerId);
91 extern void AlterOpFamilyOwner(List *name, const char *access_method, Oid newOwnerId);
93 /* commands/tsearchcmds.c */
94 extern void DefineTSParser(List *names, List *parameters);
95 extern void RenameTSParser(List *oldname, const char *newname);
96 extern void RemoveTSParsers(DropStmt *drop);
97 extern void RemoveTSParserById(Oid prsId);
99 extern void DefineTSDictionary(List *names, List *parameters);
100 extern void RenameTSDictionary(List *oldname, const char *newname);
101 extern void RemoveTSDictionaries(DropStmt *drop);
102 extern void RemoveTSDictionaryById(Oid dictId);
103 extern void AlterTSDictionary(AlterTSDictionaryStmt *stmt);
104 extern void AlterTSDictionaryOwner(List *name, Oid newOwnerId);
106 extern void DefineTSTemplate(List *names, List *parameters);
107 extern void RenameTSTemplate(List *oldname, const char *newname);
108 extern void RemoveTSTemplates(DropStmt *stmt);
109 extern void RemoveTSTemplateById(Oid tmplId);
111 extern void DefineTSConfiguration(List *names, List *parameters);
112 extern void RenameTSConfiguration(List *oldname, const char *newname);
113 extern void RemoveTSConfigurations(DropStmt *stmt);
114 extern void RemoveTSConfigurationById(Oid cfgId);
115 extern void AlterTSConfiguration(AlterTSConfigurationStmt *stmt);
116 extern void AlterTSConfigurationOwner(List *name, Oid newOwnerId);
118 extern text *serialize_deflist(List *deflist);
119 extern List *deserialize_deflist(Datum txt);
121 /* commands/foreigncmds.c */
122 extern void AlterForeignServerOwner(const char *name, Oid newOwnerId);
123 extern void AlterForeignDataWrapperOwner(const char *name, Oid newOwnerId);
124 extern void CreateForeignDataWrapper(CreateFdwStmt *stmt);
125 extern void AlterForeignDataWrapper(AlterFdwStmt *stmt);
126 extern void RemoveForeignDataWrapper(DropFdwStmt *stmt);
127 extern void RemoveForeignDataWrapperById(Oid fdwId);
128 extern void CreateForeignServer(CreateForeignServerStmt *stmt);
129 extern void AlterForeignServer(AlterForeignServerStmt *stmt);
130 extern void RemoveForeignServer(DropForeignServerStmt *stmt);
131 extern void RemoveForeignServerById(Oid srvId);
132 extern void CreateUserMapping(CreateUserMappingStmt *stmt);
133 extern void AlterUserMapping(AlterUserMappingStmt *stmt);
134 extern void RemoveUserMapping(DropUserMappingStmt *stmt);
135 extern void RemoveUserMappingById(Oid umId);
137 /* support routines in commands/define.c */
139 extern char *case_translate_language_name(const char *input);
141 extern char *defGetString(DefElem *def);
142 extern double defGetNumeric(DefElem *def);
143 extern bool defGetBoolean(DefElem *def);
144 extern int64 defGetInt64(DefElem *def);
145 extern List *defGetQualifiedName(DefElem *def);
146 extern TypeName *defGetTypeName(DefElem *def);
147 extern int defGetTypeLength(DefElem *def);
148 extern DefElem *defWithOids(bool value);
150 #endif /* DEFREM_H */