mirror of https://github.com/citusdata/citus.git
Changes copy to \copy
parent
93b97248b2
commit
c8a81ef1ce
|
@ -54,7 +54,7 @@ CREATE TABLE multi_append_table_to_shard_stage
|
||||||
text TEXT not null
|
text TEXT not null
|
||||||
);
|
);
|
||||||
|
|
||||||
COPY multi_append_table_to_shard_stage FROM '@abs_srcdir@/data/large_records.data' with delimiter '|';
|
\COPY multi_append_table_to_shard_stage FROM '@abs_srcdir@/data/large_records.data' with delimiter '|';
|
||||||
|
|
||||||
-- Check that we error out if we try to append data to a hash partitioned table.
|
-- Check that we error out if we try to append data to a hash partitioned table.
|
||||||
SELECT master_create_empty_shard('multi_append_table_to_shard_right_reference_hash');
|
SELECT master_create_empty_shard('multi_append_table_to_shard_right_reference_hash');
|
||||||
|
|
|
@ -15,8 +15,8 @@ SELECT create_distributed_table('users_table', 'user_id');
|
||||||
CREATE TABLE events_table (user_id int, time timestamp, event_type int, value_2 int, value_3 float, value_4 bigint);
|
CREATE TABLE events_table (user_id int, time timestamp, event_type int, value_2 int, value_3 float, value_4 bigint);
|
||||||
SELECT create_distributed_table('events_table', 'user_id');
|
SELECT create_distributed_table('events_table', 'user_id');
|
||||||
|
|
||||||
COPY users_table FROM '@abs_srcdir@/data/users_table.data' WITH CSV;
|
\COPY users_table FROM '@abs_srcdir@/data/users_table.data' WITH CSV;
|
||||||
COPY events_table FROM '@abs_srcdir@/data/events_table.data' WITH CSV;
|
\COPY events_table FROM '@abs_srcdir@/data/events_table.data' WITH CSV;
|
||||||
|
|
||||||
SET citus.shard_count = 96;
|
SET citus.shard_count = 96;
|
||||||
CREATE SCHEMA subquery_and_ctes;
|
CREATE SCHEMA subquery_and_ctes;
|
||||||
|
@ -28,8 +28,8 @@ SELECT create_distributed_table('users_table', 'user_id');
|
||||||
CREATE TABLE events_table (user_id int, time timestamp, event_type int, value_2 int, value_3 float, value_4 bigint);
|
CREATE TABLE events_table (user_id int, time timestamp, event_type int, value_2 int, value_3 float, value_4 bigint);
|
||||||
SELECT create_distributed_table('events_table', 'user_id');
|
SELECT create_distributed_table('events_table', 'user_id');
|
||||||
|
|
||||||
COPY users_table FROM '@abs_srcdir@/data/users_table.data' WITH CSV;
|
\COPY users_table FROM '@abs_srcdir@/data/users_table.data' WITH CSV;
|
||||||
COPY events_table FROM '@abs_srcdir@/data/events_table.data' WITH CSV;
|
\COPY events_table FROM '@abs_srcdir@/data/events_table.data' WITH CSV;
|
||||||
|
|
||||||
SET citus.shard_count TO DEFAULT;
|
SET citus.shard_count TO DEFAULT;
|
||||||
SET search_path TO DEFAULT;
|
SET search_path TO DEFAULT;
|
||||||
|
@ -68,8 +68,8 @@ INSERT INTO users_ref_test_table VALUES(4,'User_4',48);
|
||||||
INSERT INTO users_ref_test_table VALUES(5,'User_5',49);
|
INSERT INTO users_ref_test_table VALUES(5,'User_5',49);
|
||||||
INSERT INTO users_ref_test_table VALUES(6,'User_6',50);
|
INSERT INTO users_ref_test_table VALUES(6,'User_6',50);
|
||||||
|
|
||||||
COPY users_table FROM '@abs_srcdir@/data/users_table.data' WITH CSV;
|
\COPY users_table FROM '@abs_srcdir@/data/users_table.data' WITH CSV;
|
||||||
COPY events_table FROM '@abs_srcdir@/data/events_table.data' WITH CSV;
|
\COPY events_table FROM '@abs_srcdir@/data/events_table.data' WITH CSV;
|
||||||
|
|
||||||
-- create indexes for
|
-- create indexes for
|
||||||
CREATE INDEX is_index1 ON users_table(user_id);
|
CREATE INDEX is_index1 ON users_table(user_id);
|
||||||
|
|
|
@ -72,7 +72,7 @@ CREATE TABLE multi_append_table_to_shard_stage
|
||||||
number INTEGER not null,
|
number INTEGER not null,
|
||||||
text TEXT not null
|
text TEXT not null
|
||||||
);
|
);
|
||||||
COPY multi_append_table_to_shard_stage FROM '@abs_srcdir@/data/large_records.data' with delimiter '|';
|
\COPY multi_append_table_to_shard_stage FROM '@abs_srcdir@/data/large_records.data' with delimiter '|';
|
||||||
-- Check that we error out if we try to append data to a hash partitioned table.
|
-- Check that we error out if we try to append data to a hash partitioned table.
|
||||||
SELECT master_create_empty_shard('multi_append_table_to_shard_right_reference_hash');
|
SELECT master_create_empty_shard('multi_append_table_to_shard_right_reference_hash');
|
||||||
ERROR: relation "multi_append_table_to_shard_right_reference_hash" is a hash partitioned table
|
ERROR: relation "multi_append_table_to_shard_right_reference_hash" is a hash partitioned table
|
||||||
|
|
|
@ -21,8 +21,8 @@ SELECT create_distributed_table('events_table', 'user_id');
|
||||||
|
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
COPY users_table FROM '@abs_srcdir@/data/users_table.data' WITH CSV;
|
\COPY users_table FROM '@abs_srcdir@/data/users_table.data' WITH CSV;
|
||||||
COPY events_table FROM '@abs_srcdir@/data/events_table.data' WITH CSV;
|
\COPY events_table FROM '@abs_srcdir@/data/events_table.data' WITH CSV;
|
||||||
SET citus.shard_count = 96;
|
SET citus.shard_count = 96;
|
||||||
CREATE SCHEMA subquery_and_ctes;
|
CREATE SCHEMA subquery_and_ctes;
|
||||||
SET search_path TO subquery_and_ctes;
|
SET search_path TO subquery_and_ctes;
|
||||||
|
@ -40,8 +40,8 @@ SELECT create_distributed_table('events_table', 'user_id');
|
||||||
|
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
COPY users_table FROM '@abs_srcdir@/data/users_table.data' WITH CSV;
|
\COPY users_table FROM '@abs_srcdir@/data/users_table.data' WITH CSV;
|
||||||
COPY events_table FROM '@abs_srcdir@/data/events_table.data' WITH CSV;
|
\COPY events_table FROM '@abs_srcdir@/data/events_table.data' WITH CSV;
|
||||||
SET citus.shard_count TO DEFAULT;
|
SET citus.shard_count TO DEFAULT;
|
||||||
SET search_path TO DEFAULT;
|
SET search_path TO DEFAULT;
|
||||||
CREATE TABLE users_table (user_id int, time timestamp, value_1 int, value_2 int, value_3 float, value_4 bigint);
|
CREATE TABLE users_table (user_id int, time timestamp, value_1 int, value_2 int, value_3 float, value_4 bigint);
|
||||||
|
@ -110,8 +110,8 @@ INSERT INTO users_ref_test_table VALUES(3,'User_3',47);
|
||||||
INSERT INTO users_ref_test_table VALUES(4,'User_4',48);
|
INSERT INTO users_ref_test_table VALUES(4,'User_4',48);
|
||||||
INSERT INTO users_ref_test_table VALUES(5,'User_5',49);
|
INSERT INTO users_ref_test_table VALUES(5,'User_5',49);
|
||||||
INSERT INTO users_ref_test_table VALUES(6,'User_6',50);
|
INSERT INTO users_ref_test_table VALUES(6,'User_6',50);
|
||||||
COPY users_table FROM '@abs_srcdir@/data/users_table.data' WITH CSV;
|
\COPY users_table FROM '@abs_srcdir@/data/users_table.data' WITH CSV;
|
||||||
COPY events_table FROM '@abs_srcdir@/data/events_table.data' WITH CSV;
|
\COPY events_table FROM '@abs_srcdir@/data/events_table.data' WITH CSV;
|
||||||
-- create indexes for
|
-- create indexes for
|
||||||
CREATE INDEX is_index1 ON users_table(user_id);
|
CREATE INDEX is_index1 ON users_table(user_id);
|
||||||
CREATE INDEX is_index2 ON events_table(user_id);
|
CREATE INDEX is_index2 ON events_table(user_id);
|
||||||
|
|
Loading…
Reference in New Issue