Database.create_database¶
-
Database.
create_database
(db_name: str, owner: str = 'postgres')[source]¶ Creates a database named
db_name
. Iftimescaledb_extension
is set (default is ‘True’), the TimescaleDB extension is installed in the database to allow TimescaleDB hypertables.- Parameters
- Raises
psycopg2.Error – Base exception for all kind of database errors