Database.create_timescale_db

Database.create_timescale_db(table_name: str, default_now: bool = True)[source]

Creates a TimescaleDB table.

The table has a single column named ‘time’ with type ‘TIMESTAMPTZ’. If the flag default_now is set (default is ‘True’), the column ‘time’ will default to ‘NOW()’

Parameters
  • table_name (str) – The name of the table to be checked

  • default_now (bool, optional) – Set the ‘time’ column default to ‘NOW()’, default is True.

Raises

psycopg2.Error – Base exception for all kind of database errors