解决timescaledb插件,时序表查看指定的SQL执行计划不准确

(cherry picked commit from <gitee.com//opengauss/openGauss-server/commit/a7b6f5cad7f11e7d2c0a4419f8b06970018f993a>
This commit is contained in:
08ming
2024-09-22 20:13:32 +08:00
committed by 叶某人
parent 3ddb5e18e5
commit fc9e24fd68

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) {