00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef DEFREM_H
00015 #define DEFREM_H
00016
00017 #include "nodes/parsenodes.h"
00018
00019
00020 extern void RemoveObjects(DropStmt *stmt);
00021
00022
00023 extern Oid DefineIndex(IndexStmt *stmt,
00024 Oid indexRelationId,
00025 bool is_alter_table,
00026 bool check_rights,
00027 bool skip_build,
00028 bool quiet);
00029 extern Oid ReindexIndex(RangeVar *indexRelation);
00030 extern Oid ReindexTable(RangeVar *relation);
00031 extern Oid ReindexDatabase(const char *databaseName,
00032 bool do_system, bool do_user);
00033 extern char *makeObjectName(const char *name1, const char *name2,
00034 const char *label);
00035 extern char *ChooseRelationName(const char *name1, const char *name2,
00036 const char *label, Oid namespaceid);
00037 extern bool CheckIndexCompatible(Oid oldId,
00038 RangeVar *heapRelation,
00039 char *accessMethodName,
00040 List *attributeList,
00041 List *exclusionOpNames);
00042 extern Oid GetDefaultOpClass(Oid type_id, Oid am_id);
00043
00044
00045 extern Oid CreateFunction(CreateFunctionStmt *stmt, const char *queryString);
00046 extern void RemoveFunctionById(Oid funcOid);
00047 extern void SetFunctionReturnType(Oid funcOid, Oid newRetType);
00048 extern void SetFunctionArgType(Oid funcOid, int argIndex, Oid newArgType);
00049 extern Oid AlterFunction(AlterFunctionStmt *stmt);
00050 extern Oid CreateCast(CreateCastStmt *stmt);
00051 extern void DropCastById(Oid castOid);
00052 extern void IsThereFunctionInNamespace(const char *proname, int pronargs,
00053 oidvector proargtypes, Oid nspOid);
00054 extern void ExecuteDoStmt(DoStmt *stmt);
00055 extern Oid get_cast_oid(Oid sourcetypeid, Oid targettypeid, bool missing_ok);
00056
00057
00058 extern Oid DefineOperator(List *names, List *parameters);
00059 extern void RemoveOperatorById(Oid operOid);
00060
00061
00062 extern Oid DefineAggregate(List *name, List *args, bool oldstyle,
00063 List *parameters);
00064
00065
00066 extern Oid DefineOpClass(CreateOpClassStmt *stmt);
00067 extern Oid DefineOpFamily(CreateOpFamilyStmt *stmt);
00068 extern Oid AlterOpFamily(AlterOpFamilyStmt *stmt);
00069 extern void RemoveOpClassById(Oid opclassOid);
00070 extern void RemoveOpFamilyById(Oid opfamilyOid);
00071 extern void RemoveAmOpEntryById(Oid entryOid);
00072 extern void RemoveAmProcEntryById(Oid entryOid);
00073 extern void IsThereOpClassInNamespace(const char *opcname, Oid opcmethod,
00074 Oid opcnamespace);
00075 extern void IsThereOpFamilyInNamespace(const char *opfname, Oid opfmethod,
00076 Oid opfnamespace);
00077 extern Oid get_am_oid(const char *amname, bool missing_ok);
00078 extern Oid get_opclass_oid(Oid amID, List *opclassname, bool missing_ok);
00079 extern Oid get_opfamily_oid(Oid amID, List *opfamilyname, bool missing_ok);
00080
00081
00082 extern Oid DefineTSParser(List *names, List *parameters);
00083 extern void RemoveTSParserById(Oid prsId);
00084
00085 extern Oid DefineTSDictionary(List *names, List *parameters);
00086 extern void RemoveTSDictionaryById(Oid dictId);
00087 extern Oid AlterTSDictionary(AlterTSDictionaryStmt *stmt);
00088
00089 extern Oid DefineTSTemplate(List *names, List *parameters);
00090 extern void RemoveTSTemplateById(Oid tmplId);
00091
00092 extern Oid DefineTSConfiguration(List *names, List *parameters);
00093 extern void RemoveTSConfigurationById(Oid cfgId);
00094 extern Oid AlterTSConfiguration(AlterTSConfigurationStmt *stmt);
00095
00096 extern text *serialize_deflist(List *deflist);
00097 extern List *deserialize_deflist(Datum txt);
00098
00099
00100 extern Oid AlterForeignServerOwner(const char *name, Oid newOwnerId);
00101 extern void AlterForeignServerOwner_oid(Oid, Oid newOwnerId);
00102 extern Oid AlterForeignDataWrapperOwner(const char *name, Oid newOwnerId);
00103 extern void AlterForeignDataWrapperOwner_oid(Oid fwdId, Oid newOwnerId);
00104 extern Oid CreateForeignDataWrapper(CreateFdwStmt *stmt);
00105 extern Oid AlterForeignDataWrapper(AlterFdwStmt *stmt);
00106 extern void RemoveForeignDataWrapperById(Oid fdwId);
00107 extern Oid CreateForeignServer(CreateForeignServerStmt *stmt);
00108 extern Oid AlterForeignServer(AlterForeignServerStmt *stmt);
00109 extern void RemoveForeignServerById(Oid srvId);
00110 extern Oid CreateUserMapping(CreateUserMappingStmt *stmt);
00111 extern Oid AlterUserMapping(AlterUserMappingStmt *stmt);
00112 extern Oid RemoveUserMapping(DropUserMappingStmt *stmt);
00113 extern void RemoveUserMappingById(Oid umId);
00114 extern void CreateForeignTable(CreateForeignTableStmt *stmt, Oid relid);
00115 extern Datum transformGenericOptions(Oid catalogId,
00116 Datum oldOptions,
00117 List *options,
00118 Oid fdwvalidator);
00119
00120
00121
00122 extern char *defGetString(DefElem *def);
00123 extern double defGetNumeric(DefElem *def);
00124 extern bool defGetBoolean(DefElem *def);
00125 extern int64 defGetInt64(DefElem *def);
00126 extern List *defGetQualifiedName(DefElem *def);
00127 extern TypeName *defGetTypeName(DefElem *def);
00128 extern int defGetTypeLength(DefElem *def);
00129 extern DefElem *defWithOids(bool value);
00130
00131 #endif