mirror of
https://github.com/timescale/timescaledb.git
synced 2025-05-24 23:34:25 +08:00
19 lines
432 B
Plaintext
19 lines
432 B
Plaintext
CREATE DATABASE iobeam;
|
|
|
|
\c iobeam
|
|
CREATE EXTENSION IF NOT EXISTS iobeamdb CASCADE;
|
|
|
|
\o /dev/null
|
|
\echo 'Set up database as meta node...'
|
|
select setup_meta();
|
|
\echo 'Set up database as data node...'
|
|
select setup_main();
|
|
|
|
SELECT add_cluster_user('postgres', NULL);
|
|
|
|
\echo 'Adding database to the single-node cluster...'
|
|
SELECT set_meta('iobeam' :: NAME, 'localhost');
|
|
SELECT add_node('iobeam' :: NAME, 'localhost');
|
|
|
|
\echo 'Success'
|