【问题标题】:Can't display hypertable information: timescaledb_information.hypertable does not exist无法显示超表信息:timescaledb_information.hypertable 不存在
【发布时间】:2021-04-14 20:05:02
【问题描述】:

我正在尝试显示超表信息,但似乎无法访问信息表。

此请求成功

select * from _timescaledb_catalog.hypertable;

但是这个没有,说表不存在:

select * from timescaledb_information.hypertable;

正如预期的那样,创建超表没有任何区别。

前一个命令在 https://github.com/timescale/timescaledb/issues/648 中找到,如果用户参考 0.10 文档,我会理解它是否已过时。

后者来自文档:https://docs.timescale.com/latest/api#utilities,所以它应该可以工作。

我正在使用 Timescale DB 2.2.0(官方 Timescale 存储库)和 PostgreSQL 11(Debian 存储库)。

【问题讨论】:

    标签: postgresql timescaledb


    【解决方案1】:

    timescaledb_information.hypertable 是此信息视图的旧名称。从 2.0 开始,所有信息视图的名称都使用复数而不是单数。所以这个信息视图被重命名为timescaledb_information.hypertables。它的定义也更新了,见docs。

    以下查询应该在 2.2.0 中工作:

    select * from timescaledb_information.hypertables;
    

    我也建议查看overall changes in 2.0。

    【讨论】:

    • 我已经在运行 2.0。我刚刚删除了一个数据库,从头开始重新创建它,创建了 timescaledb 扩展。它在 ASCII 艺术徽标下显示为“运行版本 2.1.0”。不过,我收到的是_timescaledb_catalog,但不是timescaledb_information。
    • @Jérôme 你写timescaledb_information.hypertable 还是timescaledb_information.hypertables?注意第二种情况的复数。你得到什么错误?
    • @Jérôme 你从\dv得到什么?
    • 天啊。复数是问题。我一定是从过时的来源复制的。我什至错过了你的回答,对此感到抱歉。它适用于复数。谢谢。
    • 这个问题可以作为拼写错误被删除或关闭,但由于单数是一个旧名称,其他人可能会陷入其中,所以我将离开它。
    猜你喜欢
    • 2018-04-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-01-01
    • 2017-07-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多