Can't display hypertable information: timescaledb_information.hypertable does not exist
Asked Answered
C

1

0

I'm trying to display hypertable information but can't seem to access the information table.

This request succeeds

select * from _timescaledb_catalog.hypertable;

But this one doesn't, says the table doesn't exist:

select * from timescaledb_information.hypertable;

As expected, creating a hypertable doesn't make any difference.

The former command was found in https://github.com/timescale/timescaledb/issues/648 and I would understand if it was obsolete as the user refers to the 0.10 docs.

The latter comes from the docs: https://docs.timescale.com/latest/api#utilities so it should work.

I'm using Timescale DB 2.2.0 (official Timescale repos) with PostgreSQL 11 (Debian repos).

Coxalgia answered 14/4, 2021 at 9:31 Comment(0)
E
8

timescaledb_information.hypertable is old name for this information view. From 2.0 all information views use plural instead of singular in the names. So this information view is renamed to timescaledb_information.hypertables. Its definition was updated too, see it in the docs.

The following query should work in 2.2.0:

select * from timescaledb_information.hypertables;

I also suggest to check the overall changes in 2.0.

Excrete answered 14/4, 2021 at 10:50 Comment(6)
I'm running 2.0 already. I just dropped a DB, recreated it from scratch, created timescaledb extension. It read "Running version 2.1.0" under the ASCII art logo. Still, I'm getting _timescaledb_catalog but not timescaledb_information.Neogaea
@Coxalgia Do you write timescaledb_information.hypertable or timescaledb_information.hypertables? Note plural in the second case. What error do you get?Excrete
@Coxalgia What do you get from \dv?Excrete
Oh boy. The plural was the issue. I must have copied from an outdated source. I even missed it in your answer, sorry about that. It works with the plural. Thanks.Neogaea
This question could be deleted or closed as typo but since singular is an old name, someone else might fall into it so I'm leaving it.Neogaea
For completeness, _timescaledb_catalog.hypertable is a table, timescaledb_information.hypertables is a view. Both are listed by \dt *.* and \dv *.* respectively.Neogaea

© 2022 - 2024 — McMap. All rights reserved.