agora inbox for [email protected]  
help / color / mirror / Atom feed
From: amit <[email protected]>
Subject: [PATCH 4/4] Add a note about DROP NOT NULL and partitions
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 | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/doc/src/sgml/ref/alter_table.sgml b/doc/src/sgml/ref/alter_table.sgml
index da431f8369..be857882bb 100644
--- a/doc/src/sgml/ref/alter_table.sgml
+++ b/doc/src/sgml/ref/alter_table.sgml
@@ -172,9 +172,13 @@ 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.  One might however want to set it for only some partitions,
+      which is possible by doing <literal>SET NOT NULL</literal> on individual
+      partitions.
      </para>
     </listitem>
    </varlistentry>
-- 
2.11.0


--------------89FC639615756AE2477DE3D6
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
MIME-Version: 1.0


-- 
Sent via pgsql-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

--------------89FC639615756AE2477DE3D6--






view thread (53+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected]
  Subject: Re: [PATCH 4/4] Add a note about DROP NOT NULL and partitions
  In-Reply-To: <no-message-id-569484@localhost>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox