Skip to content

Commit a308de1

Browse files
jfrocheyvan-sraka
authored andcommitted
feat: improve pg_regress to validate pg_logical_slot_get_changes parameters used in supabase/realtime
1 parent 3e9a975 commit a308de1

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

nix/tests/expected/wal2json.out

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,17 @@ from
1919
'reg_test',
2020
null,
2121
null,
22-
'include-pk', '1',
22+
'include-pk', 'true',
2323
'include-transaction', 'false',
2424
'include-timestamp', 'false',
25-
'include-type-oids', 'false',
25+
'include-type-oids', 'true',
2626
'format-version', '2',
27-
'actions', 'insert,update,delete'
27+
'actions', 'insert,update,delete',
28+
'add-tables', 'v.foo'
2829
) x;
29-
data
30-
--------------------------------------------------------------------------------------------------------------------------------------
31-
{"action":"I","schema":"v","table":"foo","columns":[{"name":"id","type":"integer","value":1}],"pk":[{"name":"id","type":"integer"}]}
30+
data
31+
----------------------------------------------------------------------------------------------------------------------------------------------------------------
32+
{"action":"I","schema":"v","table":"foo","columns":[{"name":"id","type":"integer","typeoid":23,"value":1}],"pk":[{"name":"id","type":"integer","typeoid":23}]}
3233
(1 row)
3334

3435
select

nix/tests/sql/wal2json.sql

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,13 @@ from
1818
'reg_test',
1919
null,
2020
null,
21-
'include-pk', '1',
21+
'include-pk', 'true',
2222
'include-transaction', 'false',
2323
'include-timestamp', 'false',
24-
'include-type-oids', 'false',
24+
'include-type-oids', 'true',
2525
'format-version', '2',
26-
'actions', 'insert,update,delete'
26+
'actions', 'insert,update,delete',
27+
'add-tables', 'v.foo'
2728
) x;
2829

2930
select

0 commit comments

Comments
 (0)