1--test COPY
2SELECT * FROM pglogical_regress_variables()
3\gset
4
5\c :provider_dsn
6
7SELECT pglogical.replicate_ddl_command($$
8     CREATE TABLE public.x (
9	a serial primary key,
10	b int,
11	c text not null default 'stuff',
12	d text,
13	e text
14     );
15$$);
16
17SELECT * FROM pglogical.replication_set_add_table('default', 'x');
18
19SELECT pglogical.wait_slot_confirm_lsn(NULL, NULL);
20
21COPY x (a, b, c, d, e) from stdin;
229999	\N	\\N	\NN	\N
2310000	21	31	41	51
24\.
25
26COPY x (b, d) from stdin;
271	test_1
28\.
29
30COPY x (b, d) from stdin;
312	test_2
323	test_3
334	test_4
345	test_5
356	test_6
367	test_7
378	test_8
389	test_9
3910	test_10
4011	test_11
4112	test_12
4213	test_13
4314	test_14
4415	test_15
45\.
46
47COPY x (a, b, c, d, e) from stdin;
4810001	22	32	42	52
4910002	23	33	43	53
5010003	24	34	44	54
5110004	25	35	45	55
5210005	26	36	46	56
53\.
54
55SELECT * FROM x ORDER BY a;
56SELECT pglogical.wait_slot_confirm_lsn(NULL, NULL);
57
58\c :subscriber_dsn
59SELECT * FROM x ORDER BY a;
60
61\c :provider_dsn
62
63\set VERBOSITY terse
64SELECT pglogical.replicate_ddl_command($$
65	DROP TABLE public.x CASCADE;
66$$);
67