File: decoderbufs.out

package info (click to toggle)
postgres-decoderbufs 3.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 184 kB
  • sloc: ansic: 559; makefile: 17; sql: 5; sh: 1
file content (27 lines) | stat: -rw-r--r-- 1,108 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
select slot_name from pg_create_logical_replication_slot('decoderbufs_demo', 'decoderbufs');
INFO:  Exiting startup callback
    slot_name     
------------------
 decoderbufs_demo
(1 row)

create table foo (id int primary key, data text);
insert into foo values (1, 'Important stuff');
select regexp_replace(data, '(txid|commit_time)\[\d+\]', '\1[***]', 'g') as data
from pg_logical_slot_peek_changes('decoderbufs_demo', NULL, NULL, 'debug-mode', '1');
NOTICE:  Decoderbufs DEBUG MODE is ON.
INFO:  Exiting startup callback
                            data                            
------------------------------------------------------------
 txid[***], commit_time[***], op[3]
 txid[***], commit_time[***], op[4]
 txid[***], commit_time[***], op[3]
 txid[***], commit_time[***], table[public.foo], op[0]     +
 NEW TUPLE:                                                +
 column_name[id], column_type[23], datum[1]                +
 column_name[data], column_type[25], datum[Important stuff]+
                                                           +
 
 txid[***], commit_time[***], op[4]
(5 rows)