Subject: [PATCH 2/3] Add a note about DROP NOT NULL and partitions

From: amit <[email-masked]>
Date: Fri, 10 Feb 2017 15:03:45 +0900

On the ALTER TABLE refpage, it seems better to mention how to drop
drop the not null constraint of a partition's column.  Per suggestion
from Corey Huinker.
---
 doc/src/sgml/ref/alter_table.sgml | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/doc/src/sgml/ref/alter_table.sgml b/doc/src/sgml/ref/alter_table.sgml
index 077c00373d..b6be3a0dcb 100644
--- a/doc/src/sgml/ref/alter_table.sgml
+++ b/doc/src/sgml/ref/alter_table.sgml
@@ -172,9 +172,14 @@ ALTER TABLE [ IF EXISTS ] <replaceable class="PARAMETER">name</replaceable>
      </para>
 
      <para>
-      If this table is a partition, one cannot perform <literal>DROP NOT NULL</>
+      If this table is a partition, one cannot perform <literal>DROP NOT NULL</literal>
       on a column if it is marked <literal>NOT NULL</literal> in the parent
-      table.
+      table.  To drop the <literal>NOT NULL</literal> constraint from all the
+      partitions, perform <literal>DROP NOT NULL</literal> on the parent
+      table.  Even if there is no <literal>NOT NULL</> constraint on the
+      parent, such a constraint can still be added to individual partitions,
+      if desired; that is, the children can disallow nulls even if the parent
+      allows them, but not the other way around. 
      </para>
     </listitem>
    </varlistentry>
-- 
2.11.0

--------------19C79A137EF2D0DB3BE72F79
Content-Type: text/x-diff;
 name="0003-Listify-a-note-on-the-CREATE-TABLE-page.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="0003-Listify-a-note-on-the-CREATE-TABLE-page.patch"