CREATE PUBLICATION ref: Minor tweaks to row filters
authorAlvaro Herrera
Thu, 21 Apr 2022 16:57:40 +0000 (18:57 +0200)
committerAlvaro Herrera
Thu, 21 Apr 2022 17:01:36 +0000 (19:01 +0200)
Prompted by a complaint from Justin Pryzby.

Reviewed-by: Amit Kapila
Discussion: https://postgr.es/m/20220414003301[email protected]

doc/src/sgml/ref/create_publication.sgml

index 23d883c1581cf029d995c901864dfffe1d1c7da8..1a828e8d2ffddd483b4585f9b739d267f03f026a 100644 (file)
@@ -79,7 +79,8 @@ CREATE PUBLICATION name
      
 
      
-      If the optional WHERE clause is specified, rows for
+      If the optional WHERE clause is specified, it defines a
+      row filter expression. Rows for
       which the expression
       evaluates to false or null will not be published. Note that parentheses
       are required around the expression. It has no effect on
@@ -192,6 +193,11 @@ CREATE PUBLICATION name
           consisting of a different set of partitions.
          
 
+         
+          This parameter also affects how row filters and column lists are
+          chosen for partitions; see below for details.
+         
+
          
           If this is enabled, TRUNCATE operations performed
           directly on partitions are not replicated.
@@ -241,21 +247,28 @@ CREATE PUBLICATION name
   
 
   
-   A WHERE (i.e. row filter) expression must contain only
+   A row filter expression (i.e., the WHERE clause) must contain only
    columns that are covered by the REPLICA IDENTITY, in
    order for UPDATE and DELETE operations
    to be published. For publication of INSERT operations,
    any column may be used in the WHERE expression. The
-   WHERE clause allows simple expressions that don't have
+   row filter allows simple expressions that don't have
    user-defined functions, user-defined operators, user-defined types,
    user-defined collations, non-immutable built-in functions, or references to
    system columns.
-   If your publication contains a partitioned table, the publication parameter
-   publish_via_partition_root determines if it uses the
-   partition's row filter (if the parameter is false, the default) or the root
-   partitioned table's row filter.
+  
+
+  
+   For published partitioned tables, the row filter for each
+   partition is taken from the published partitioned table if the
+   publication parameter publish_via_partition_root is true,
+   or from the partition itself if it is false (the default).
    See  for details about row
    filters.
+   Similarly, for published partitioned tables, the column list for each
+   partition is taken from the published partitioned table if the
+   publication parameter publish_via_partition_root is true,
+   or from the partition itself if it is false.