修复了group by后面不能加rownum(或别名)的bug以及where后面接rownum的别名的报错信息
This commit is contained in:
@ -444,7 +444,11 @@ static Node* replaceExprAliasIfNecessary(ParseState* pstate, char* colname, Colu
|
||||
(errcode(ERRCODE_UNDEFINED_COLUMN),
|
||||
errmsg("Alias \"%s\" reference with window function included is not supported.", colname),
|
||||
parser_errposition(pstate, cref->location)));
|
||||
|
||||
} else if (contain_rownum_expr((Node*)tle->expr)) {
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_UNDEFINED_COLUMN),
|
||||
errmsg("Alias \"%s\" reference with ROWNUM included is invalid.", colname),
|
||||
parser_errposition(pstate, cref->location)));
|
||||
} else if (contain_volatile_functions((Node*)tle->expr)) {
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_UNDEFINED_COLUMN),
|
||||
|
||||
Reference in New Issue
Block a user