fix some error
This commit is contained in:
@ -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;
|
||||
|
||||
@ -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++;
|
||||
|
||||
Reference in New Issue
Block a user