Merged in fix-double-hypertable-create-2 (pull request #38)

Fix double hypertable create 2
This commit is contained in:
Matvey Arye 2017-01-19 19:50:41 +00:00
commit 24e49136d8
28 changed files with 214 additions and 27 deletions

View File

@ -9,7 +9,8 @@
--IO101 - operation not supported
--IO102 - no partitioning column for hypertable
--IO103 - unknown index type
--IO104 - illegal name/identifier.
--IO104 - illegal name/identifier
--IO110 - hypertable already exists
--IO500 - GROUP: internal error
--IO501 - unexpected state/event

View File

@ -42,22 +42,28 @@ BEGIN
FROM pg_attribute
WHERE attrelid = main_table AND attname = time_column_name;
SELECT *
INTO hypertable_row
FROM _iobeamdb_meta_api.create_hypertable(
schema_name,
table_name,
time_column_name,
time_column_type,
partitioning_column,
replication_factor,
number_partitions,
associated_schema_name,
associated_table_prefix,
hypertable_name,
placement,
chunk_size_bytes
);
BEGIN
SELECT *
INTO hypertable_row
FROM _iobeamdb_meta_api.create_hypertable(
schema_name,
table_name,
time_column_name,
time_column_type,
partitioning_column,
replication_factor,
number_partitions,
associated_schema_name,
associated_table_prefix,
hypertable_name,
placement,
chunk_size_bytes
);
EXCEPTION
WHEN unique_violation THEN
RAISE EXCEPTION 'hypertable already exists: %', hypertable_name
USING ERRCODE = 'IO110';
END;
FOR att_row IN SELECT *
FROM pg_attribute att

View File

@ -81,6 +81,7 @@ BEGIN
END
$BODY$
SET client_min_messages = WARNING --suppress NOTICE on IF EXISTS schema
SET SEARCH_PATH = 'public';

View File

@ -16,4 +16,6 @@ BEGIN
FOR EACH ROW EXECUTE PROCEDURE _sysinternal.on_create_kafka_offset_node();
END
$BODY$;
$BODY$
SET client_min_messages = WARNING --suppress if trigger does not exist on drop notices
;

View File

@ -101,4 +101,6 @@ BEGIN
EXECUTE PROCEDURE _sysinternal.ddl_process_drop_table();
END
$BODY$;
$BODY$
SET client_min_messages = WARNING --supress notices for trigger drops
;

View File

@ -13,7 +13,9 @@ BEGIN
CREATE SCHEMA IF NOT EXISTS %I
$$, schema_name);
END
$BODY$;
$BODY$
SET client_min_messages = WARNING --suppress NOTICE on IF EXISTS
;
-- Creates a table for a hypertable (e.g. main table or root table)
CREATE OR REPLACE FUNCTION _sysinternal.create_table(
@ -289,4 +291,6 @@ BEGIN
_sysinternal.time_literal_sql(end_time, time_col_type));
END IF;
END
$BODY$;
$BODY$
SET client_min_messages = WARNING --supress notice by drop constraint if exists.
;

View File

@ -66,7 +66,7 @@ BEGIN
time_column_name, time_column_type,
created_on
)
ON CONFLICT DO NOTHING RETURNING * INTO hypertable_row;
RETURNING * INTO hypertable_row;
IF number_partitions != 0 THEN
PERFORM add_equi_partition_epoch(hypertable_name, number_partitions, partitioning_column);

View File

@ -28,7 +28,9 @@ BEGIN
END IF;
RETURN NEW;
END
$BODY$;
$BODY$
SET client_min_messages = WARNING --supress schema if exists notice.
;
CREATE OR REPLACE FUNCTION _meta.sync_node()
RETURNS TRIGGER LANGUAGE PLPGSQL AS

View File

@ -73,4 +73,6 @@ BEGIN
END LOOP;
END
$BODY$;
$BODY$
SET client_min_messages = WARNING --supress notices for trigger drops
;

View File

@ -1,4 +1,6 @@
\set ON_ERROR_STOP 1
\set VERBOSITY verbose
\set SHOW_CONTEXT never
\ir include/create_clustered_db.sql
@ -29,6 +31,11 @@ CREATE INDEX ON PUBLIC."testNs" (time DESC NULLS LAST, really_long_column_goes_o
SELECT * FROM create_hypertable('"public"."testNs"', 'time', 'Device_id', hypertable_name=>'testNs');
\set ON_ERROR_STOP 0
SELECT * FROM create_hypertable('"public"."testNs"', 'time', 'Device_id', hypertable_name=>'testNs');
\set ON_ERROR_STOP 1
SELECT set_is_distinct_flag('"public"."testNs"', 'Device_id', TRUE);
\c meta

View File

@ -1,4 +1,6 @@
\set ON_ERROR_STOP 1
\set VERBOSITY verbose
\set SHOW_CONTEXT never
\o /dev/null
\ir include/create_clustered_db.sql

View File

@ -1,4 +1,6 @@
\set ON_ERROR_STOP 1
\set VERBOSITY verbose
\set SHOW_CONTEXT never
\o /dev/null
\ir include/create_single_db.sql

View File

@ -1,13 +1,31 @@
psql:include/create_clustered_db.sql:12: NOTICE: 00000: installing required extension "dblink"
LOCATION: CreateExtensionInternal, extension.c:1441
psql:include/create_clustered_db.sql:12: NOTICE: 00000: installing required extension "postgres_fdw"
LOCATION: CreateExtensionInternal, extension.c:1441
psql:include/create_clustered_db.sql:12: NOTICE: 00000: installing required extension "hstore"
LOCATION: CreateExtensionInternal, extension.c:1441
setup_meta
------------
(1 row)
psql:include/create_clustered_db.sql:16: NOTICE: 00000: installing required extension "dblink"
LOCATION: CreateExtensionInternal, extension.c:1441
psql:include/create_clustered_db.sql:16: NOTICE: 00000: installing required extension "postgres_fdw"
LOCATION: CreateExtensionInternal, extension.c:1441
psql:include/create_clustered_db.sql:16: NOTICE: 00000: installing required extension "hstore"
LOCATION: CreateExtensionInternal, extension.c:1441
setup_main
------------
(1 row)
psql:include/create_clustered_db.sql:20: NOTICE: 00000: installing required extension "dblink"
LOCATION: CreateExtensionInternal, extension.c:1441
psql:include/create_clustered_db.sql:20: NOTICE: 00000: installing required extension "postgres_fdw"
LOCATION: CreateExtensionInternal, extension.c:1441
psql:include/create_clustered_db.sql:20: NOTICE: 00000: installing required extension "hstore"
LOCATION: CreateExtensionInternal, extension.c:1441
setup_main
------------
@ -47,16 +65,31 @@ CREATE TABLE PUBLIC."testNs" (
latitude BIGINT NULL,
really_long_column_goes_on_and_on_and_on_and_on_and_on_and_on_and_on_and_on BIGINT NULL
);
psql:cluster.sql:25: NOTICE: 42622: identifier "really_long_column_goes_on_and_on_and_on_and_on_and_on_and_on_and_on_and_on" will be truncated to "really_long_column_goes_on_and_on_and_on_and_on_and_on_and_on_a"
LOCATION: truncate_identifier, scansup.c:205
CREATE INDEX ON PUBLIC."testNs" ("Device_id", time DESC NULLS LAST) WHERE "Device_id" IS NOT NULL;
CREATE INDEX ON PUBLIC."testNs" (temp, time DESC NULLS LAST) WHERE temp IS NOT NULL;
CREATE INDEX ON PUBLIC."testNs" (really_long_column_goes_on_and_on_and_on_and_on_and_on_and_on_and_on_and_on, time DESC NULLS LAST) WHERE really_long_column_goes_on_and_on_and_on_and_on_and_on_and_on_and_on_and_on IS NOT NULL;
psql:cluster.sql:29: NOTICE: 42622: identifier "really_long_column_goes_on_and_on_and_on_and_on_and_on_and_on_and_on_and_on" will be truncated to "really_long_column_goes_on_and_on_and_on_and_on_and_on_and_on_a"
LOCATION: truncate_identifier, scansup.c:205
psql:cluster.sql:29: NOTICE: 42622: identifier "really_long_column_goes_on_and_on_and_on_and_on_and_on_and_on_and_on_and_on" will be truncated to "really_long_column_goes_on_and_on_and_on_and_on_and_on_and_on_a"
LOCATION: truncate_identifier, scansup.c:205
CREATE INDEX ON PUBLIC."testNs" (time DESC NULLS LAST, really_long_column_goes_on_and_on_and_on_and_on_and_on_and_on_and_on_and_on) WHERE really_long_column_goes_on_and_on_and_on_and_on_and_on_and_on_and_on_and_on IS NOT NULL;
psql:cluster.sql:30: NOTICE: 42622: identifier "really_long_column_goes_on_and_on_and_on_and_on_and_on_and_on_and_on_and_on" will be truncated to "really_long_column_goes_on_and_on_and_on_and_on_and_on_and_on_a"
LOCATION: truncate_identifier, scansup.c:205
psql:cluster.sql:30: NOTICE: 42622: identifier "really_long_column_goes_on_and_on_and_on_and_on_and_on_and_on_and_on_and_on" will be truncated to "really_long_column_goes_on_and_on_and_on_and_on_and_on_and_on_a"
LOCATION: truncate_identifier, scansup.c:205
SELECT * FROM create_hypertable('"public"."testNs"', 'time', 'Device_id', hypertable_name=>'testNs');
name | main_schema_name | main_table_name | associated_schema_name | associated_table_prefix | root_schema_name | root_table_name | distinct_schema_name | distinct_table_name | replication_factor | placement | time_column_name | time_column_type | created_on | chunk_size_bytes
--------+------------------+-----------------+------------------------+-------------------------+------------------+-----------------+----------------------+---------------------+--------------------+-----------+------------------+------------------+------------+------------------
testNs | public | testNs | _sysinternal | _hyper_1 | _sysinternal | _hyper_1_root | _sysinternal | _hyper_1_distinct | 1 | STICKY | time | bigint | Test1 | 1073741824
(1 row)
\set ON_ERROR_STOP 0
SELECT * FROM create_hypertable('"public"."testNs"', 'time', 'Device_id', hypertable_name=>'testNs');
psql:cluster.sql:36: ERROR: IO110: hypertable already exists: testNs
LOCATION: exec_stmt_raise, pl_exec.c:3165
\set ON_ERROR_STOP 1
SELECT set_is_distinct_flag('"public"."testNs"', 'Device_id', TRUE);
set_is_distinct_flag
----------------------
@ -576,6 +609,8 @@ Child tables: _sysinternal._hyper_1_0_replica
\c meta
SELECT _meta.close_chunk_end(1);
psql:cluster.sql:117: WARNING: 01000: Cannot close an empty chunk table
LOCATION: exec_stmt_raise, pl_exec.c:3165
close_chunk_end
-----------------

View File

@ -1,3 +1,21 @@
psql:include/create_clustered_db.sql:12: NOTICE: 00000: installing required extension "dblink"
LOCATION: CreateExtensionInternal, extension.c:1441
psql:include/create_clustered_db.sql:12: NOTICE: 00000: installing required extension "postgres_fdw"
LOCATION: CreateExtensionInternal, extension.c:1441
psql:include/create_clustered_db.sql:12: NOTICE: 00000: installing required extension "hstore"
LOCATION: CreateExtensionInternal, extension.c:1441
psql:include/create_clustered_db.sql:16: NOTICE: 00000: installing required extension "dblink"
LOCATION: CreateExtensionInternal, extension.c:1441
psql:include/create_clustered_db.sql:16: NOTICE: 00000: installing required extension "postgres_fdw"
LOCATION: CreateExtensionInternal, extension.c:1441
psql:include/create_clustered_db.sql:16: NOTICE: 00000: installing required extension "hstore"
LOCATION: CreateExtensionInternal, extension.c:1441
psql:include/create_clustered_db.sql:20: NOTICE: 00000: installing required extension "dblink"
LOCATION: CreateExtensionInternal, extension.c:1441
psql:include/create_clustered_db.sql:20: NOTICE: 00000: installing required extension "postgres_fdw"
LOCATION: CreateExtensionInternal, extension.c:1441
psql:include/create_clustered_db.sql:20: NOTICE: 00000: installing required extension "hstore"
LOCATION: CreateExtensionInternal, extension.c:1441
\c meta
SELECT add_cluster_user('postgres', NULL);
add_cluster_user
@ -74,7 +92,11 @@ VALUES(1257894000000000000, 'dev1', 30, 70, 1, 2, 3, 100);
--expect error cases
\set ON_ERROR_STOP 0
UPDATE "Hypertable_1" SET time = 0 WHERE TRUE;
psql:include/ddl_ops_1.sql:27: ERROR: IO101: UPDATEs not supported on hypertables
LOCATION: exec_stmt_raise, pl_exec.c:3165
DELETE FROM "Hypertable_1" WHERE "Device_id" = 'dev1';
psql:include/ddl_ops_1.sql:28: ERROR: IO101: DELETEs not currently supported on hypertables
LOCATION: exec_stmt_raise, pl_exec.c:3165
\set ON_ERROR_STOP 1
SELECT * FROM PUBLIC."Hypertable_1";
time | Device_id | temp_c | humidity | sensor_1 | sensor_2 | sensor_3 | sensor_4
@ -229,7 +251,11 @@ DROP INDEX "ind_sensor_1";
--expect error cases
\set ON_ERROR_STOP 0
ALTER TABLE PUBLIC."Hypertable_1" ALTER COLUMN sensor_2_renamed SET DATA TYPE int;
psql:include/ddl_ops_2.sql:17: ERROR: IO101: ALTER TABLE ... ALTER COLUMN SET DATA TYPE not supported on hypertable "Hypertable_1"
LOCATION: exec_stmt_raise, pl_exec.c:3165
ALTER INDEX "ind_humidity" RENAME TO "ind_humdity2";
psql:include/ddl_ops_2.sql:18: ERROR: IO101: ALTER INDEX not supported on hypertable "Hypertable_1"
LOCATION: exec_stmt_raise, pl_exec.c:3165
\set ON_ERROR_STOP 1
--create column with same name as previously renamed one
ALTER TABLE PUBLIC."Hypertable_1" ADD COLUMN sensor_3 BIGINT NOT NULL DEFAULT 131;

View File

@ -1,3 +1,9 @@
psql:include/create_single_db.sql:7: NOTICE: 00000: installing required extension "dblink"
LOCATION: CreateExtensionInternal, extension.c:1441
psql:include/create_single_db.sql:7: NOTICE: 00000: installing required extension "postgres_fdw"
LOCATION: CreateExtensionInternal, extension.c:1441
psql:include/create_single_db.sql:7: NOTICE: 00000: installing required extension "hstore"
LOCATION: CreateExtensionInternal, extension.c:1441
\c single
SELECT add_cluster_user('postgres', NULL);
add_cluster_user
@ -67,7 +73,11 @@ VALUES(1257894000000000000, 'dev1', 30, 70, 1, 2, 3, 100);
--expect error cases
\set ON_ERROR_STOP 0
UPDATE "Hypertable_1" SET time = 0 WHERE TRUE;
psql:include/ddl_ops_1.sql:27: ERROR: IO101: UPDATEs not supported on hypertables
LOCATION: exec_stmt_raise, pl_exec.c:3165
DELETE FROM "Hypertable_1" WHERE "Device_id" = 'dev1';
psql:include/ddl_ops_1.sql:28: ERROR: IO101: DELETEs not currently supported on hypertables
LOCATION: exec_stmt_raise, pl_exec.c:3165
\set ON_ERROR_STOP 1
SELECT * FROM PUBLIC."Hypertable_1";
time | Device_id | temp_c | humidity | sensor_1 | sensor_2 | sensor_3 | sensor_4
@ -117,7 +127,11 @@ DROP INDEX "ind_sensor_1";
--expect error cases
\set ON_ERROR_STOP 0
ALTER TABLE PUBLIC."Hypertable_1" ALTER COLUMN sensor_2_renamed SET DATA TYPE int;
psql:include/ddl_ops_2.sql:17: ERROR: IO101: ALTER TABLE ... ALTER COLUMN SET DATA TYPE not supported on hypertable "Hypertable_1"
LOCATION: exec_stmt_raise, pl_exec.c:3165
ALTER INDEX "ind_humidity" RENAME TO "ind_humdity2";
psql:include/ddl_ops_2.sql:18: ERROR: IO101: ALTER INDEX not supported on hypertable "Hypertable_1"
LOCATION: exec_stmt_raise, pl_exec.c:3165
\set ON_ERROR_STOP 1
--create column with same name as previously renamed one
ALTER TABLE PUBLIC."Hypertable_1" ADD COLUMN sensor_3 BIGINT NOT NULL DEFAULT 131;

View File

@ -1,3 +1,12 @@
psql:include/create_clustered_db.sql:12: NOTICE: installing required extension "dblink"
psql:include/create_clustered_db.sql:12: NOTICE: installing required extension "postgres_fdw"
psql:include/create_clustered_db.sql:12: NOTICE: installing required extension "hstore"
psql:include/create_clustered_db.sql:16: NOTICE: installing required extension "dblink"
psql:include/create_clustered_db.sql:16: NOTICE: installing required extension "postgres_fdw"
psql:include/create_clustered_db.sql:16: NOTICE: installing required extension "hstore"
psql:include/create_clustered_db.sql:20: NOTICE: installing required extension "dblink"
psql:include/create_clustered_db.sql:20: NOTICE: installing required extension "postgres_fdw"
psql:include/create_clustered_db.sql:20: NOTICE: installing required extension "hstore"
\c Test1
\d+ "_sysinternal".*
Index "_sysinternal.1-testNs_device_id_timeCustom_idx"

View File

@ -1,14 +1,19 @@
\ir include/insert.sql
\set ON_ERROR_STOP 1
\ir create_clustered_db.sql
SET client_min_messages = WARNING;
DROP DATABASE IF EXISTS meta;
DROP DATABASE IF EXISTS "Test1";
DROP DATABASE IF EXISTS test2;
SET client_min_messages = NOTICE;
CREATE DATABASE meta;
CREATE DATABASE "Test1";
CREATE DATABASE test2;
\c meta
CREATE EXTENSION IF NOT EXISTS iobeamdb CASCADE;
psql:include/create_clustered_db.sql:12: NOTICE: installing required extension "dblink"
psql:include/create_clustered_db.sql:12: NOTICE: installing required extension "postgres_fdw"
psql:include/create_clustered_db.sql:12: NOTICE: installing required extension "hstore"
select setup_meta();
setup_meta
------------
@ -17,6 +22,9 @@ select setup_meta();
\c Test1
CREATE EXTENSION IF NOT EXISTS iobeamdb CASCADE;
psql:include/create_clustered_db.sql:16: NOTICE: installing required extension "dblink"
psql:include/create_clustered_db.sql:16: NOTICE: installing required extension "postgres_fdw"
psql:include/create_clustered_db.sql:16: NOTICE: installing required extension "hstore"
select setup_main();
setup_main
------------
@ -25,6 +33,9 @@ select setup_main();
\c test2
CREATE EXTENSION IF NOT EXISTS iobeamdb CASCADE;
psql:include/create_clustered_db.sql:20: NOTICE: installing required extension "dblink"
psql:include/create_clustered_db.sql:20: NOTICE: installing required extension "postgres_fdw"
psql:include/create_clustered_db.sql:20: NOTICE: installing required extension "hstore"
select setup_main();
setup_main
------------

View File

@ -1,10 +1,15 @@
\ir include/insert_single.sql
\set ON_ERROR_STOP 1
\ir create_single_db.sql
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 iobeamdb CASCADE;
psql:include/create_single_db.sql:7: NOTICE: installing required extension "dblink"
psql:include/create_single_db.sql:7: NOTICE: installing required extension "postgres_fdw"
psql:include/create_single_db.sql:7: NOTICE: installing required extension "hstore"
SELECT setup_meta();
setup_meta
------------

View File

@ -1,4 +1,23 @@
psql:include/create_clustered_db.sql:12: NOTICE: 00000: installing required extension "dblink"
LOCATION: CreateExtensionInternal, extension.c:1441
psql:include/create_clustered_db.sql:12: NOTICE: 00000: installing required extension "postgres_fdw"
LOCATION: CreateExtensionInternal, extension.c:1441
psql:include/create_clustered_db.sql:12: NOTICE: 00000: installing required extension "hstore"
LOCATION: CreateExtensionInternal, extension.c:1441
psql:include/create_clustered_db.sql:16: NOTICE: 00000: installing required extension "dblink"
LOCATION: CreateExtensionInternal, extension.c:1441
psql:include/create_clustered_db.sql:16: NOTICE: 00000: installing required extension "postgres_fdw"
LOCATION: CreateExtensionInternal, extension.c:1441
psql:include/create_clustered_db.sql:16: NOTICE: 00000: installing required extension "hstore"
LOCATION: CreateExtensionInternal, extension.c:1441
psql:include/create_clustered_db.sql:20: NOTICE: 00000: installing required extension "dblink"
LOCATION: CreateExtensionInternal, extension.c:1441
psql:include/create_clustered_db.sql:20: NOTICE: 00000: installing required extension "postgres_fdw"
LOCATION: CreateExtensionInternal, extension.c:1441
psql:include/create_clustered_db.sql:20: NOTICE: 00000: installing required extension "hstore"
LOCATION: CreateExtensionInternal, extension.c:1441
\c Test1
SET client_min_messages = WARNING;
SELECT *
FROM ioql_exec_query(new_ioql_query(hypertable_name => 'testNs'));
json
@ -18,6 +37,8 @@ FROM ioql_exec_query(new_ioql_query(hypertable_name => 'testNs'));
\set ON_ERROR_STOP 0
SELECT *
FROM ioql_exec_query(new_ioql_query(hypertable_name => 'DoesNotExist'));
psql:ioql_query.sql:18: ERROR: IO001: Hypertable 'DoesNotExist' does not exist
LOCATION: exec_stmt_raise, pl_exec.c:3165
\set ON_ERROR_STOP 1
SELECT *
FROM ioql_exec_query(new_ioql_query(hypertable_name => 'testNs',

View File

@ -1,3 +1,12 @@
psql:include/create_clustered_db.sql:12: NOTICE: installing required extension "dblink"
psql:include/create_clustered_db.sql:12: NOTICE: installing required extension "postgres_fdw"
psql:include/create_clustered_db.sql:12: NOTICE: installing required extension "hstore"
psql:include/create_clustered_db.sql:16: NOTICE: installing required extension "dblink"
psql:include/create_clustered_db.sql:16: NOTICE: installing required extension "postgres_fdw"
psql:include/create_clustered_db.sql:16: NOTICE: installing required extension "hstore"
psql:include/create_clustered_db.sql:20: NOTICE: installing required extension "dblink"
psql:include/create_clustered_db.sql:20: NOTICE: installing required extension "postgres_fdw"
psql:include/create_clustered_db.sql:20: NOTICE: installing required extension "hstore"
setup_kafka
-------------

View File

@ -1,3 +1,12 @@
psql:include/create_clustered_db.sql:12: NOTICE: installing required extension "dblink"
psql:include/create_clustered_db.sql:12: NOTICE: installing required extension "postgres_fdw"
psql:include/create_clustered_db.sql:12: NOTICE: installing required extension "hstore"
psql:include/create_clustered_db.sql:16: NOTICE: installing required extension "dblink"
psql:include/create_clustered_db.sql:16: NOTICE: installing required extension "postgres_fdw"
psql:include/create_clustered_db.sql:16: NOTICE: installing required extension "hstore"
psql:include/create_clustered_db.sql:20: NOTICE: installing required extension "dblink"
psql:include/create_clustered_db.sql:20: NOTICE: installing required extension "postgres_fdw"
psql:include/create_clustered_db.sql:20: NOTICE: installing required extension "hstore"
\c Test1
SELECT * FROM "testNs";
timeCustom | device_id | series_0 | series_1 | series_2 | series_bool

View File

@ -1,3 +1,12 @@
psql:include/create_clustered_db.sql:12: NOTICE: installing required extension "dblink"
psql:include/create_clustered_db.sql:12: NOTICE: installing required extension "postgres_fdw"
psql:include/create_clustered_db.sql:12: NOTICE: installing required extension "hstore"
psql:include/create_clustered_db.sql:16: NOTICE: installing required extension "dblink"
psql:include/create_clustered_db.sql:16: NOTICE: installing required extension "postgres_fdw"
psql:include/create_clustered_db.sql:16: NOTICE: installing required extension "hstore"
psql:include/create_clustered_db.sql:20: NOTICE: installing required extension "dblink"
psql:include/create_clustered_db.sql:20: NOTICE: installing required extension "postgres_fdw"
psql:include/create_clustered_db.sql:20: NOTICE: installing required extension "hstore"
\c meta
SELECT add_cluster_user('postgres', NULL);
add_cluster_user
@ -71,6 +80,7 @@ SELECT * FROM PUBLIC."testNs";
2009-11-10 23:00:00 | dev2 | 1.5 | 2 | |
(5 rows)
SET client_min_messages = WARNING;
SELECT *
FROM ioql_exec_query(new_ioql_query(hypertable_name => 'testNs'));
json

View File

@ -1,6 +1,9 @@
SET client_min_messages = WARNING;
DROP DATABASE IF EXISTS meta;
DROP DATABASE IF EXISTS "Test1";
DROP DATABASE IF EXISTS test2;
SET client_min_messages = NOTICE;
CREATE DATABASE meta;
CREATE DATABASE "Test1";
CREATE DATABASE test2;

View File

@ -1,4 +1,6 @@
SET client_min_messages = WARNING;
DROP DATABASE IF EXISTS single;
SET client_min_messages = NOTICE;
CREATE DATABASE single;
\c single

View File

@ -1,4 +1,6 @@
\set ON_ERROR_STOP 1
\set VERBOSITY verbose
\set SHOW_CONTEXT never
\o /dev/null
\ir include/insert.sql
@ -6,6 +8,7 @@
\o
\set ECHO ALL
\c Test1
SET client_min_messages = WARNING;
SELECT *
FROM ioql_exec_query(new_ioql_query(hypertable_name => 'testNs'));

View File

@ -5,10 +5,8 @@
\o
\c Test1
\ir ../../setup/sql/load_kafka.sql
select setup_kafka();
\c test2
\ir ../../setup/sql/load_kafka.sql
select setup_kafka();
\set ECHO ALL

View File

@ -4,7 +4,7 @@ set -e
UPDATE=${UPDATE:-false}
golden_test() {
psql -h localhost -U postgres -q -X -f $1 > actual/$2
psql -h localhost -U postgres -q -X -f $1 > actual/$2 2>&1
if diff expected/$2 actual/$2;
then

View File

@ -44,6 +44,7 @@ INSERT INTO "testNs"("timeCustom", device_id, series_0, series_1) VALUES
SELECT * FROM PUBLIC."testNs";
SET client_min_messages = WARNING;
SELECT *
FROM ioql_exec_query(new_ioql_query(hypertable_name => 'testNs'));