Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit270698e

Browse files
committed
tests
1 parentdf2d6f8 commit270698e

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

‎contrib/test_decoding/expected/prepared.out

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ BEGIN;
2525
INSERT INTO test_prepared1 VALUES (5);
2626
ALTER TABLE test_prepared1 ADD COLUMN data text;
2727
INSERT INTO test_prepared1 VALUES (6, 'frakbar');
28+
LOCK test_prepared1;
2829
PREPARE TRANSACTION 'test_prepared#3';
2930
-- test that we decode correctly while an uncommitted prepared xact
3031
-- with ddl exists.
@@ -44,27 +45,33 @@ SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'inc
4445
-------------------------------------------------------------------------
4546
BEGIN
4647
table public.test_prepared1: INSERT: id[integer]:1
47-
COMMIT
48+
PREPARE
49+
COMMIT PREPARED
4850
BEGIN
4951
table public.test_prepared1: INSERT: id[integer]:2
5052
COMMIT
5153
BEGIN
52-
table public.test_prepared1: INSERT: id[integer]:4
53-
COMMIT
54+
table public.test_prepared1: INSERT: id[integer]:3
55+
PREPARE
56+
ABORT PREPARED
5457
BEGIN
55-
table public.test_prepared2: INSERT: id[integer]:7
58+
table public.test_prepared1: INSERT: id[integer]:4
5659
COMMIT
5760
BEGIN
5861
table public.test_prepared1: INSERT: id[integer]:5
5962
table public.test_prepared1: INSERT: id[integer]:6 data[text]:'frakbar'
63+
PREPARE
64+
BEGIN
65+
table public.test_prepared2: INSERT: id[integer]:7
6066
COMMIT
67+
COMMIT PREPARED
6168
BEGIN
6269
table public.test_prepared1: INSERT: id[integer]:8 data[text]:null
6370
COMMIT
6471
BEGIN
6572
table public.test_prepared2: INSERT: id[integer]:9
6673
COMMIT
67-
(22 rows)
74+
(28 rows)
6875

6976
SELECT pg_drop_replication_slot('regression_slot');
7077
pg_drop_replication_slot

‎contrib/test_decoding/sql/prepared.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ BEGIN;
2525
INSERT INTO test_prepared1VALUES (5);
2626
ALTERTABLE test_prepared1 ADD COLUMN datatext;
2727
INSERT INTO test_prepared1VALUES (6,'frakbar');
28+
LOCK test_prepared1;
2829
PREPARE TRANSACTION'test_prepared#3';
2930

3031
-- test that we decode correctly while an uncommitted prepared xact

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp