Skip to content

Commit d655614

Browse files
committed
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
1 parent 4785e37 commit d655614

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

doc/src/sgml/ref/alter_table.sgml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,9 +175,14 @@ ALTER TABLE [ IF EXISTS ] <replaceable class="PARAMETER">name</replaceable>
175175
</para>
176176

177177
<para>
178-
If this table is a partition, one cannot perform <literal>DROP NOT NULL</>
178+
If this table is a partition, one cannot perform <literal>DROP NOT NULL</literal>
179179
on a column if it is marked <literal>NOT NULL</literal> in the parent
180-
table.
180+
table. To drop the <literal>NOT NULL</literal> constraint from all the
181+
partitions, perform <literal>DROP NOT NULL</literal> on the parent
182+
table. Even if there is no <literal>NOT NULL</> constraint on the
183+
parent, such a constraint can still be added to individual partitions,
184+
if desired; that is, the children can disallow nulls even if the parent
185+
allows them, but not the other way around.
181186
</para>
182187
</listitem>
183188
</varlistentry>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy