aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2017-03-27 11:01:33 -0400
committerRobert Haas <rhaas@postgresql.org>2017-03-27 11:01:33 -0400
commitd65561464f45d325e82ad91918bcd4e2881ce567 (patch)
treed150831e995a75534507a9b97e716ffd6a30034b
parent4785e377f9c3189c06051ece7ebb112220f365f6 (diff)
downloadpostgresql-d65561464f45d325e82ad91918bcd4e2881ce567.tar.gz
postgresql-d65561464f45d325e82ad91918bcd4e2881ce567.zip
Improve documentation of how NOT NULL works with partitioning.
Amit Langote Discussion: http://postgr.es/m/a6f99cdb-21e7-1d65-1381-91f2cfa156e2@lab.ntt.co.jp
-rw-r--r--doc/src/sgml/ref/alter_table.sgml9
1 files changed, 7 insertions, 2 deletions
diff --git a/doc/src/sgml/ref/alter_table.sgml b/doc/src/sgml/ref/alter_table.sgml
index 75de2262539..7829f378bba 100644
--- a/doc/src/sgml/ref/alter_table.sgml
+++ b/doc/src/sgml/ref/alter_table.sgml
@@ -175,9 +175,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>