According to the docs:
TimescaleDB supports having different extension versions on different databases within the same PostgreSQL instance.
I can get the installed version of the instance with this SQL command:
SELECT extversion
FROM pg_extension
where extname = 'timescaledb';
But how can I get the version of a specific database?
Notes:
ALTER EXTENSION timescaledb UPDATE;
) or notTimescaleDB is an open-source time series database developed by Timescale Inc. It is written in C and extends PostgreSQL. TimescaleDB supports standard SQL queries and is a relational database.
Turns out, that my assumption was wrong:
SELECT extversion
FROM pg_extension
where extname = 'timescaledb';
returns the version of the currently connected database.
Here is how we can find out the versions:
SELECT default_version, installed_version FROM pg_available_extensions
where name = 'timescaledb';
default_version
: is the version installed in the PostgreSQL server instanceinstalled_version
: is the version that the current database is usingExample:
When the extension used by the database is not up-to-date, the versions do not match:
SELECT default_version, installed_version FROM pg_available_extensions
where name = 'timescaledb';
default_version | installed_version
-----------------+-------------------
1.4.1 | 1.4.0
now update the extension
psql -X -U USER -W -D DBNAME
ALTER EXTENSION timescaledb UPDATE;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With