diff --git a/src/test/subscription/t/011_generated.pl b/src/test/subscription/t/011_generated.pl index f449969..fe32987 100644 --- a/src/test/subscription/t/011_generated.pl +++ b/src/test/subscription/t/011_generated.pl @@ -28,14 +28,16 @@ $node_subscriber->safe_psql('postgres', "CREATE TABLE tab1 (a int PRIMARY KEY, b int GENERATED ALWAYS AS (a * 22) STORED, c int)" ); -# publisher-side tab2 has generated col 'b' but subscriber-side tab2 has NON-generated col 'b'. +# tab2: +# publisher-side tab2 has generated col 'b'. +# subscriber-side tab2 has non-generated col 'b'. $node_publisher->safe_psql('postgres', "CREATE TABLE tab2 (a int, b int GENERATED ALWAYS AS (a * 2) STORED)"); $node_subscriber->safe_psql('postgres', "CREATE TABLE tab2 (a int, b int)"); # tab3: -# publisher-side tab3 has generated col 'b' but -# subscriber-side tab3 has DIFFERENT COMPUTATION generated col 'b'. +# publisher-side tab3 has generated col 'b'. +# subscriber-side tab3 has generated col 'b', using a different computation. $node_publisher->safe_psql('postgres', "CREATE TABLE tab3 (a int, b int GENERATED ALWAYS AS (a + 10) STORED)"); $node_subscriber->safe_psql('postgres', @@ -97,8 +99,11 @@ is( $result, qq(1|22| 6|132|), 'generated columns replicated'); # -# TEST tab2: the publisher-side col 'b' is generated, and the subscriber-side -# col 'b' is not generated, so confirm that col 'b' IS replicated. +# TEST tab2: +# publisher-side tab2 has generated col 'b'. +# subscriber-side tab2 has non-generated col 'b'. +# +# Confirm that col 'b' is replicated. # $node_publisher->safe_psql('postgres', "INSERT INTO tab2 VALUES (4), (5)"); $node_publisher->wait_for_catchup('sub2'); @@ -110,10 +115,13 @@ is( $result, qq(4|8 ); # -# TEST tab3: the publisher-side col 'b' is generated, and the subscriber-side -# col 'b' is also generated, so confirmed that col 'b' IS NOT replicated. We -# can know this because the result value is the subscriber-side computation -# (which is not the same as the publisher-side computation for col 'b'). +# TEST tab3: +# publisher-side tab3 has generated col 'b'. +# subscriber-side tab3 has generated col 'b', using a different computation. +# +# Confirm that col 'b' is NOT replicated. We can know this because the result +# value is the subscriber-side computation (which is different from the +# publisher-side computation for this column). # $node_publisher->safe_psql('postgres', "INSERT INTO tab3 VALUES (4), (5)"); $node_publisher->wait_for_catchup('sub3');