Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 482501d

Browse files
committed
doc: Clarify logical replication documentation
Document that the data types of replicated tables do not need to match. The documentation previously claimed that they had to match. Author: Robert Treat <rob@xzilla.net> Discussion: https://www.postgresql.org/message-id/flat/CAJSLCQ13==D8Ka2YLyctTm0Y+8MhGYcX_zj7fU0rqRzhcV++3w@mail.gmail.com
1 parent 6b85489 commit 482501d

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

doc/src/sgml/logical-replication.sgml

+9-4
Original file line numberDiff line numberDiff line change
@@ -232,10 +232,15 @@
232232
</para>
233233

234234
<para>
235-
Columns of a table are also matched by name. A different order of columns
236-
in the target table is allowed, but the column types have to match. The
237-
target table can have additional columns not provided by the published
238-
table. Those will be filled with their default values.
235+
Columns of a table are also matched by name. The order of columns in the
236+
subscriber table does not need to match that of the publisher. The data
237+
types of the columns do not need to match, as long as the text
238+
representation of the data can be converted to the target type. For
239+
example, you can replicate from a column of type <type>integer</type> to a
240+
column of type <type>bigint</type>. The target table can also have
241+
additional columns not provided by the published table. Any such columns
242+
will be filled with the default value as specified in the definition of the
243+
target table.
239244
</para>
240245

241246
<sect2 id="logical-replication-subscription-slot">

0 commit comments

Comments
 (0)