aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2024-09-30 11:58:13 +0200
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2024-09-30 11:58:13 +0200
commit4dea33ce765d65d8807d343ca6535a3d067a63da (patch)
tree1b93c52362d032b785ec662bf234d198221d0c87 /doc/src
parent4c7cd07aa62abc29e6885e95b5307e5e08bb3bf7 (diff)
downloadpostgresql-4dea33ce765d65d8807d343ca6535a3d067a63da.tar.gz
postgresql-4dea33ce765d65d8807d343ca6535a3d067a63da.zip
Don't disallow DROP of constraints ONLY on partitioned tables
This restriction seems to have come about due to some fuzzy thinking: in commit 9139aa19423b we were adding a restriction against ADD constraint ONLY on partitioned tables (which is sensible) and apparently we thought the DROP case had to be symmetrical. However, it isn't, and the comments about it are mistaken about the effect it would have. Remove this limitation. There have been no reports of users bothered by this limitation, so I'm not backpatching it just yet. We can revisit this decision later, as needed. Reviewed-by: Amit Langote <amitlangote09@gmail.com> Discussion: https://postgr.es/m/202409261752.nbvlawkxsttf@alvherre.pgsql Discussion: https://postgr.es/m/7682253a-6f79-6a92-00aa-267c4c412870@lab.ntt.co.jp (about commit 9139aa19423b, previously not registered)
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/ref/alter_table.sgml4
1 files changed, 3 insertions, 1 deletions
diff --git a/doc/src/sgml/ref/alter_table.sgml b/doc/src/sgml/ref/alter_table.sgml
index 1a49f321cf7..925f1084e00 100644
--- a/doc/src/sgml/ref/alter_table.sgml
+++ b/doc/src/sgml/ref/alter_table.sgml
@@ -251,7 +251,9 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM
table. Even if there is no <literal>NOT NULL</literal> 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.
+ allows them, but not the other way around. It is also possible to drop
+ the <literal>NOT NULL</literal> constraint from <literal>ONLY</literal>
+ the parent table, which does not remove it from the children.
</para>
</listitem>
</varlistentry>