timescaledb/test/sql/include/create_single_db.sql
Rob Kiefer cb90eef350 Rename setup_db() and fix port for local connections
If a user attempts to setup a database while not connecting using
the network, port is NULL and thus fails constraint checks. Instead,
we now use the default Postgres port of 5432 when this happens.

Also, setup_db() is renamed to setup_timescaledb() for clarity in
the presence of other extensions.
2017-03-22 09:26:03 -04:00

11 lines
338 B
SQL

\set VERBOSITY default
SET client_min_messages = WARNING;
DROP DATABASE IF EXISTS single;
SET client_min_messages = NOTICE;
CREATE DATABASE single;
\c single
CREATE EXTENSION IF NOT EXISTS timescaledb CASCADE;
SELECT setup_timescaledb(hostname => 'fakehost'); -- fakehost makes sure there is no network connection
\set VERBOSITY verbose