Debian Codegraph @

contrib/test_decoding/expected/truncate.out

raw
1 -- predictability
2 SET synchronous_commit = on;
3 SELECT 'init' FROM pg_create_logical_replication_slot('regression_slot', 'test_decoding');
4 ?column?
5 ----------
6 init
7 (1 row)
8
9 CREATE TABLE tab1 (id serial unique, data int);
10 CREATE TABLE tab2 (a int primary key, b int);
11 TRUNCATE tab1;
12 TRUNCATE tab1, tab1 RESTART IDENTITY CASCADE;
13 TRUNCATE tab1, tab2;
14 SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1');
15 data
16 ------------------------------------------------------
17 BEGIN
18 table public.tab1: TRUNCATE: (no-flags)
19 COMMIT
20 BEGIN
21 table public.tab1: TRUNCATE: restart_seqs cascade
22 COMMIT
23 BEGIN
24 table public.tab1, public.tab2: TRUNCATE: (no-flags)
25 COMMIT
26 (9 rows)
27
28 SELECT pg_drop_replication_slot('regression_slot');
29 pg_drop_replication_slot
30 --------------------------
31
32 (1 row)
33