timescaledb/scripts/sql/setup_single_node_db.psql
Erik Nordström 8abc301e51 Add support for tablespaces
Identically named tablespaces need to exist on each data node before
a hypertable is created from a table that references a tablespace.
2017-01-31 10:38:01 +01:00

19 lines
439 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 iobeam to the single-node cluster...'
SELECT set_meta('iobeam' :: NAME, 'localhost');
SELECT add_node('iobeam' :: NAME, 'localhost');
\echo 'Success'