diff --git a/contrib/test_decoding/expected/decoding_into_rel.out b/contrib/test_decoding/expected/decoding_into_rel.out index 5ec3f28..2019eb6 100644 --- a/contrib/test_decoding/expected/decoding_into_rel.out +++ b/contrib/test_decoding/expected/decoding_into_rel.out @@ -105,8 +105,8 @@ SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'inc -- check include-generated-columns option with generated column CREATE TABLE gencoltable (a int, b int GENERATED ALWAYS AS (a * 2) STORED); -INSERT INTO gencoltable (a) VALUES (1), (2), (3); -- When 'include-generated-columns' is not set +INSERT INTO gencoltable (a) VALUES (1), (2), (3); SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1'); data ------------------------------------------------------------- @@ -117,7 +117,7 @@ SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'inc COMMIT (5 rows) --- When 'include-generated-columns' = '1' the generated column 'b' values will not be replicated +-- When 'include-generated-columns' = '1' the generated column 'b' values will be replicated INSERT INTO gencoltable (a) VALUES (1), (2), (3); SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1', 'include-generated-columns', '1'); data @@ -129,8 +129,8 @@ SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'inc COMMIT (5 rows) +-- When 'include-generated-columns' = '0' the generated column 'b' values will not be replicated INSERT INTO gencoltable (a) VALUES (4), (5), (6); --- When 'include-generated-columns' = '0' the generated column 'b' values will be replicated SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1', 'include-generated-columns', '0'); data ------------------------------------------------ diff --git a/contrib/test_decoding/sql/decoding_into_rel.sql b/contrib/test_decoding/sql/decoding_into_rel.sql index 3a04e50..8ad98a0 100644 --- a/contrib/test_decoding/sql/decoding_into_rel.sql +++ b/contrib/test_decoding/sql/decoding_into_rel.sql @@ -41,15 +41,15 @@ SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'inc -- check include-generated-columns option with generated column CREATE TABLE gencoltable (a int, b int GENERATED ALWAYS AS (a * 2) STORED); -INSERT INTO gencoltable (a) VALUES (1), (2), (3); -- When 'include-generated-columns' is not set +INSERT INTO gencoltable (a) VALUES (1), (2), (3); SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1'); --- When 'include-generated-columns' = '1' the generated column 'b' values will not be replicated +-- When 'include-generated-columns' = '1' the generated column 'b' values will be replicated INSERT INTO gencoltable (a) VALUES (1), (2), (3); SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1', 'include-generated-columns', '1'); +-- When 'include-generated-columns' = '0' the generated column 'b' values will not be replicated INSERT INTO gencoltable (a) VALUES (4), (5), (6); --- When 'include-generated-columns' = '0' the generated column 'b' values will be replicated SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0', 'skip-empty-xacts', '1', 'include-generated-columns', '0'); DROP TABLE gencoltable; -SELECT 'stop' FROM pg_drop_replication_slot('regression_slot'); \ No newline at end of file +SELECT 'stop' FROM pg_drop_replication_slot('regression_slot'); diff --git a/doc/src/sgml/ref/create_subscription.sgml b/doc/src/sgml/ref/create_subscription.sgml index f072a13..2a70366 100644 --- a/doc/src/sgml/ref/create_subscription.sgml +++ b/doc/src/sgml/ref/create_subscription.sgml @@ -434,21 +434,18 @@ CREATE SUBSCRIPTION subscription_name Specifies whether the generated columns present in the tables - associated with the subscription should be replicated. If the - subscriber-side column is also a generated column then this option - has no effect; the replicated data will be ignored and the subscriber - column will be filled as normal with the subscriber-side computed or - default data. - false. + associated with the subscription should be replicated. + The default is false. - - This parameter can only be set true if copy_data is - set to false. If the subscriber-side column is also a - generated column then this option has no effect; the replicated data will - be ignored and the subscriber column will be filled as normal with the + If the subscriber-side column is also a generated column then this option + has no effect; the subscriber column will be filled as normal with the subscriber-side computed or default data. + + This parameter can only be set true if copy_data is + set to false. +