fix some error

This commit is contained in:
lvhui
2022-08-29 19:18:46 -07:00
parent d6057a4216
commit efbb94ce44
2 changed files with 3 additions and 3 deletions

View File

@ -10046,7 +10046,7 @@ static void ATExecSetNotNull(AlteredTableInfo* tab, Relation rel, const char* co
heap_close(attr_rel, RowExclusiveLock);
}
bool FetchOnUpdateExpress(Relation rel, char* colName)
bool FetchOnUpdateExpress(Relation rel, const char* colName)
{
HeapTuple htup = NULL;
bool isnull = false;

View File

@ -443,10 +443,10 @@ static void RecoredUpdateExpr(ResultRelInfo *resultRelInfo, EState *estate, CmdT
if (GetUpdateExprCol(tupdesc, i)) {
Expr *expr;
expr = (Expr *)build_column_default(rel, i + 1, false, true);
expr = (Expr *)build_column_default(resultRelInfo->ri_RelationDesc, i + 1, false, true);
if (expr == NULL)
ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("no update expression found for column number %d of table \"%s\"", i + 1,
RelationGetRelationName(rel))));
RelationGetRelationName(resultRelInfo->ri_RelationDesc))));
resultRelInfo->ri_UpdatedExprs[i] = ExecPrepareExpr(expr, estate);
resultRelInfo->ri_NumUpdatedNeeded++;