!4251 支持忽略PL/SQL间的依赖进行创建PL/SQL

Merge pull request !4251 from lukeman/master
This commit is contained in:
opengauss_bot
2023-10-24 01:55:31 +00:00
committed by Gitee
110 changed files with 18161 additions and 485 deletions

View File

@ -59,7 +59,7 @@ extern Alias* makeAlias(const char* aliasname, List* colnames);
extern RelabelType* makeRelabelType(Expr* arg, Oid rtype, int32 rtypmod, Oid rcollid, CoercionForm rformat);
extern TypeName* makeTypeNameFromOid(Oid typeOid, int32 typmod);
extern TypeName* makeTypeNameFromOid(Oid typeOid, int32 typmod, TypeDependExtend* dependExtend = NULL);
extern FuncExpr* makeFuncExpr(
Oid funcid, Oid rettype, List* args, Oid funccollid, Oid inputcollid, CoercionForm fformat);

View File

@ -469,6 +469,10 @@ typedef enum NodeTag {
T_DropEventStmt,
T_ShowEventStmt,
T_CompileStmt,
T_DependenciesProchead,
T_DependenciesUndefined,
T_DependenciesType,
T_DependenciesVariable,
T_DoStmt,
T_RenameStmt,
T_RuleStmt,

View File

@ -1384,6 +1384,21 @@ typedef struct AlterFunctionStmt {
List* actions; /* list of DefElem */
} AlterFunctionStmt;
enum CompileEntry {
COMPILE_PROCEDURE,
COMPILE_FUNCTION,
COMPILE_PACKAGE,
COMPILE_PKG_SPECIFICATION,
COMPILE_PKG_BODY
};
typedef struct CompileStmt {
NodeTag type;
List* objName;
List* funcArgs;
CompileEntry compileItem;
} CompileStmt;
typedef struct InlineCodeBlock {
NodeTag type;
char* source_text; /* source text of anonymous code block */

View File

@ -155,6 +155,16 @@ typedef struct DropRoleStmt {
DropBehavior behavior; /* CASCADE or RESTRICT */
} DropRoleStmt;
typedef struct TypeDependExtend {
Oid typeOid; /* real depend type OID */
Oid undefDependObjOid; /* undefined oid in gs_dependencies_obj when the column's type is undefined */
bool dependUndefined;
char* schemaName;
char* packageName;
char* objectName;
char typType;
char typCategory;
} TypeDependExtend;
/*
* TypeName - specifies a type in definitions
*
@ -181,6 +191,7 @@ typedef struct TypeName {
int end_location; /* %TYPE and date specified, token end location */
bool pct_rowtype; /* %ROWTYPE specified? */
int charset;
TypeDependExtend* dependExtend = NULL;
} TypeName;
typedef enum FunctionParameterMode {
@ -2244,6 +2255,7 @@ typedef struct CreateFunctionStmt {
List* withClause; /* a list of DefElem */
bool isProcedure; /* true if it is a procedure */
char* inputHeaderSrc;
char* funcHeadSrc;
bool isPrivate; /* in package, it's true is a private procedure*/
bool isFunctionDeclare; /* in package,it's true is a function delcare*/
bool isExecuted;

View File

@ -257,6 +257,8 @@ typedef struct Param {
Oid recordVarTypOid; /* package record var's composite type oid */
List* tableOfIndexTypeList; /* type Oid list of table of, max size 6 */
bool is_bind_param;
char* name;
bool is_pkg_var;
} Param;
/*