!6399 解决timescaledb插件,时序表查看指定的SQL执行计划不准确【回合6.0.0】

Merge pull request !6399 from 叶某人/cherry-pick-1727008606
This commit is contained in:
opengauss_bot
2024-09-24 06:39:36 +00:00
committed by Gitee

View File

@ -8893,13 +8893,14 @@ static char* get_variable(
/* Identify names to use */
schemaname = NULL; /* default assumptions */
refname = rte->eref->aliasname;
if (NULL != rte->relname && u_sess->hook_cxt.forTsdbHook) {
rte->relname = get_rel_name(rte->relid);
rte->eref->aliasname = rte->relname;
}
refname = rte->eref->aliasname;
/* Exceptions occur only if the RTE is alias-less */
if (rte->alias == NULL) {
if (rte->rtekind == RTE_RELATION || no_alias) {