agora inbox for [email protected]
help / color / mirror / Atom feed[PATCH 4/4] Add a note about DROP NOT NULL and partitions
53+ messages / 2 participants
[nested] [flat]
* [PATCH 2/3] Add a note about DROP NOT NULL and partitions
@ 2017-02-10 06:03 amit <[email protected]>
0 siblings, 0 replies; 53+ messages in thread
From: amit @ 2017-02-10 06:03 UTC (permalink / raw)
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
--------------434C61868FD2E7C005F82712
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"
^ permalink raw reply [nested|flat] 53+ messages in thread
* [PATCH 4/4] Add a note about DROP NOT NULL and partitions
@ 2017-02-10 06:03 amit <[email protected]>
0 siblings, 0 replies; 53+ messages in thread
From: amit @ 2017-02-10 06:03 UTC (permalink / raw)
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--
^ permalink raw reply [nested|flat] 53+ messages in thread
* [PATCH 4/4] Add a note about DROP NOT NULL and partitions
@ 2017-02-10 06:03 amit <[email protected]>
0 siblings, 0 replies; 53+ messages in thread
From: amit @ 2017-02-10 06:03 UTC (permalink / raw)
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--
^ permalink raw reply [nested|flat] 53+ messages in thread
* [PATCH 4/4] Add a note about DROP NOT NULL and partitions
@ 2017-02-10 06:03 amit <[email protected]>
0 siblings, 0 replies; 53+ messages in thread
From: amit @ 2017-02-10 06:03 UTC (permalink / raw)
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--
^ permalink raw reply [nested|flat] 53+ messages in thread
* [PATCH 2/3] Add a note about DROP NOT NULL and partitions
@ 2017-02-10 06:03 amit <[email protected]>
0 siblings, 0 replies; 53+ messages in thread
From: amit @ 2017-02-10 06:03 UTC (permalink / raw)
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
--------------434C61868FD2E7C005F82712
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"
^ permalink raw reply [nested|flat] 53+ messages in thread
* [PATCH 2/3] Add a note about DROP NOT NULL and partitions
@ 2017-02-10 06:03 amit <[email protected]>
0 siblings, 0 replies; 53+ messages in thread
From: amit @ 2017-02-10 06:03 UTC (permalink / raw)
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"
^ permalink raw reply [nested|flat] 53+ messages in thread
* [PATCH 2/3] Add a note about DROP NOT NULL and partitions
@ 2017-02-10 06:03 amit <[email protected]>
0 siblings, 0 replies; 53+ messages in thread
From: amit @ 2017-02-10 06:03 UTC (permalink / raw)
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"
^ permalink raw reply [nested|flat] 53+ messages in thread
* [PATCH 2/3] Add a note about DROP NOT NULL and partitions
@ 2017-02-10 06:03 amit <[email protected]>
0 siblings, 0 replies; 53+ messages in thread
From: amit @ 2017-02-10 06:03 UTC (permalink / raw)
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"
^ permalink raw reply [nested|flat] 53+ messages in thread
* [PATCH 4/4] Add a note about DROP NOT NULL and partitions
@ 2017-02-10 06:03 amit <[email protected]>
0 siblings, 0 replies; 53+ messages in thread
From: amit @ 2017-02-10 06:03 UTC (permalink / raw)
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--
^ permalink raw reply [nested|flat] 53+ messages in thread
* [PATCH 4/4] Add a note about DROP NOT NULL and partitions
@ 2017-02-10 06:03 amit <[email protected]>
0 siblings, 0 replies; 53+ messages in thread
From: amit @ 2017-02-10 06:03 UTC (permalink / raw)
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--
^ permalink raw reply [nested|flat] 53+ messages in thread
* [PATCH 2/3] Add a note about DROP NOT NULL and partitions
@ 2017-02-10 06:03 amit <[email protected]>
0 siblings, 0 replies; 53+ messages in thread
From: amit @ 2017-02-10 06:03 UTC (permalink / raw)
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
--------------434C61868FD2E7C005F82712
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"
^ permalink raw reply [nested|flat] 53+ messages in thread
* [PATCH 2/3] Add a note about DROP NOT NULL and partitions
@ 2017-02-10 06:03 amit <[email protected]>
0 siblings, 0 replies; 53+ messages in thread
From: amit @ 2017-02-10 06:03 UTC (permalink / raw)
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
--------------434C61868FD2E7C005F82712
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"
^ permalink raw reply [nested|flat] 53+ messages in thread
* [PATCH 4/4] Add a note about DROP NOT NULL and partitions
@ 2017-02-10 06:03 amit <[email protected]>
0 siblings, 0 replies; 53+ messages in thread
From: amit @ 2017-02-10 06:03 UTC (permalink / raw)
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--
^ permalink raw reply [nested|flat] 53+ messages in thread
* [PATCH 4/4] Add a note about DROP NOT NULL and partitions
@ 2017-02-10 06:03 amit <[email protected]>
0 siblings, 0 replies; 53+ messages in thread
From: amit @ 2017-02-10 06:03 UTC (permalink / raw)
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--
^ permalink raw reply [nested|flat] 53+ messages in thread
* [PATCH 2/3] Add a note about DROP NOT NULL and partitions
@ 2017-02-10 06:03 amit <[email protected]>
0 siblings, 0 replies; 53+ messages in thread
From: amit @ 2017-02-10 06:03 UTC (permalink / raw)
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"
^ permalink raw reply [nested|flat] 53+ messages in thread
* [PATCH 2/3] Add a note about DROP NOT NULL and partitions
@ 2017-02-10 06:03 amit <[email protected]>
0 siblings, 0 replies; 53+ messages in thread
From: amit @ 2017-02-10 06:03 UTC (permalink / raw)
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
--------------434C61868FD2E7C005F82712
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"
^ permalink raw reply [nested|flat] 53+ messages in thread
* [PATCH 4/4] Add a note about DROP NOT NULL and partitions
@ 2017-02-10 06:03 amit <[email protected]>
0 siblings, 0 replies; 53+ messages in thread
From: amit @ 2017-02-10 06:03 UTC (permalink / raw)
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--
^ permalink raw reply [nested|flat] 53+ messages in thread
* [PATCH 2/3] Add a note about DROP NOT NULL and partitions
@ 2017-02-10 06:03 amit <[email protected]>
0 siblings, 0 replies; 53+ messages in thread
From: amit @ 2017-02-10 06:03 UTC (permalink / raw)
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"
^ permalink raw reply [nested|flat] 53+ messages in thread
* [PATCH 4/4] Add a note about DROP NOT NULL and partitions
@ 2017-02-10 06:03 amit <[email protected]>
0 siblings, 0 replies; 53+ messages in thread
From: amit @ 2017-02-10 06:03 UTC (permalink / raw)
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--
^ permalink raw reply [nested|flat] 53+ messages in thread
* [PATCH 2/3] Add a note about DROP NOT NULL and partitions
@ 2017-02-10 06:03 amit <[email protected]>
0 siblings, 0 replies; 53+ messages in thread
From: amit @ 2017-02-10 06:03 UTC (permalink / raw)
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"
^ permalink raw reply [nested|flat] 53+ messages in thread
* [PATCH 2/3] Add a note about DROP NOT NULL and partitions
@ 2017-02-10 06:03 amit <[email protected]>
0 siblings, 0 replies; 53+ messages in thread
From: amit @ 2017-02-10 06:03 UTC (permalink / raw)
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
--------------434C61868FD2E7C005F82712
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"
^ permalink raw reply [nested|flat] 53+ messages in thread
* [PATCH 4/4] Add a note about DROP NOT NULL and partitions
@ 2017-02-10 06:03 amit <[email protected]>
0 siblings, 0 replies; 53+ messages in thread
From: amit @ 2017-02-10 06:03 UTC (permalink / raw)
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--
^ permalink raw reply [nested|flat] 53+ messages in thread
* [PATCH 4/4] Add a note about DROP NOT NULL and partitions
@ 2017-02-10 06:03 amit <[email protected]>
0 siblings, 0 replies; 53+ messages in thread
From: amit @ 2017-02-10 06:03 UTC (permalink / raw)
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--
^ permalink raw reply [nested|flat] 53+ messages in thread
* [PATCH 2/3] Add a note about DROP NOT NULL and partitions
@ 2017-02-10 06:03 amit <[email protected]>
0 siblings, 0 replies; 53+ messages in thread
From: amit @ 2017-02-10 06:03 UTC (permalink / raw)
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"
^ permalink raw reply [nested|flat] 53+ messages in thread
* [PATCH 4/4] Add a note about DROP NOT NULL and partitions
@ 2017-02-10 06:03 amit <[email protected]>
0 siblings, 0 replies; 53+ messages in thread
From: amit @ 2017-02-10 06:03 UTC (permalink / raw)
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--
^ permalink raw reply [nested|flat] 53+ messages in thread
* [PATCH 4/4] Add a note about DROP NOT NULL and partitions
@ 2017-02-10 06:03 amit <[email protected]>
0 siblings, 0 replies; 53+ messages in thread
From: amit @ 2017-02-10 06:03 UTC (permalink / raw)
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--
^ permalink raw reply [nested|flat] 53+ messages in thread
* [PATCH 2/3] Add a note about DROP NOT NULL and partitions
@ 2017-02-10 06:03 amit <[email protected]>
0 siblings, 0 replies; 53+ messages in thread
From: amit @ 2017-02-10 06:03 UTC (permalink / raw)
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"
^ permalink raw reply [nested|flat] 53+ messages in thread
* [PATCH 2/3] Add a note about DROP NOT NULL and partitions
@ 2017-02-10 06:03 amit <[email protected]>
0 siblings, 0 replies; 53+ messages in thread
From: amit @ 2017-02-10 06:03 UTC (permalink / raw)
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"
^ permalink raw reply [nested|flat] 53+ messages in thread
* [PATCH 2/3] Add a note about DROP NOT NULL and partitions
@ 2017-02-10 06:03 amit <[email protected]>
0 siblings, 0 replies; 53+ messages in thread
From: amit @ 2017-02-10 06:03 UTC (permalink / raw)
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
--------------434C61868FD2E7C005F82712
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"
^ permalink raw reply [nested|flat] 53+ messages in thread
* [PATCH 2/3] Add a note about DROP NOT NULL and partitions
@ 2017-02-10 06:03 amit <[email protected]>
0 siblings, 0 replies; 53+ messages in thread
From: amit @ 2017-02-10 06:03 UTC (permalink / raw)
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
--------------434C61868FD2E7C005F82712
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"
^ permalink raw reply [nested|flat] 53+ messages in thread
* [PATCH 4/4] Add a note about DROP NOT NULL and partitions
@ 2017-02-10 06:03 amit <[email protected]>
0 siblings, 0 replies; 53+ messages in thread
From: amit @ 2017-02-10 06:03 UTC (permalink / raw)
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--
^ permalink raw reply [nested|flat] 53+ messages in thread
* [PATCH 4/4] Add a note about DROP NOT NULL and partitions
@ 2017-02-10 06:03 amit <[email protected]>
0 siblings, 0 replies; 53+ messages in thread
From: amit @ 2017-02-10 06:03 UTC (permalink / raw)
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--
^ permalink raw reply [nested|flat] 53+ messages in thread
* [PATCH 2/3] Add a note about DROP NOT NULL and partitions
@ 2017-02-10 06:03 amit <[email protected]>
0 siblings, 0 replies; 53+ messages in thread
From: amit @ 2017-02-10 06:03 UTC (permalink / raw)
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"
^ permalink raw reply [nested|flat] 53+ messages in thread
* [PATCH 4/4] Add a note about DROP NOT NULL and partitions
@ 2017-02-10 06:03 amit <[email protected]>
0 siblings, 0 replies; 53+ messages in thread
From: amit @ 2017-02-10 06:03 UTC (permalink / raw)
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--
^ permalink raw reply [nested|flat] 53+ messages in thread
* [PATCH 2/3] Add a note about DROP NOT NULL and partitions
@ 2017-02-10 06:03 amit <[email protected]>
0 siblings, 0 replies; 53+ messages in thread
From: amit @ 2017-02-10 06:03 UTC (permalink / raw)
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
--------------434C61868FD2E7C005F82712
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"
^ permalink raw reply [nested|flat] 53+ messages in thread
* [PATCH 2/3] Add a note about DROP NOT NULL and partitions
@ 2017-02-10 06:03 amit <[email protected]>
0 siblings, 0 replies; 53+ messages in thread
From: amit @ 2017-02-10 06:03 UTC (permalink / raw)
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"
^ permalink raw reply [nested|flat] 53+ messages in thread
* [PATCH 2/3] Add a note about DROP NOT NULL and partitions
@ 2017-02-10 06:03 amit <[email protected]>
0 siblings, 0 replies; 53+ messages in thread
From: amit @ 2017-02-10 06:03 UTC (permalink / raw)
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
--------------434C61868FD2E7C005F82712
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"
^ permalink raw reply [nested|flat] 53+ messages in thread
* [PATCH 2/3] Add a note about DROP NOT NULL and partitions
@ 2017-02-10 06:03 amit <[email protected]>
0 siblings, 0 replies; 53+ messages in thread
From: amit @ 2017-02-10 06:03 UTC (permalink / raw)
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
--------------434C61868FD2E7C005F82712
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"
^ permalink raw reply [nested|flat] 53+ messages in thread
* [PATCH 2/3] Add a note about DROP NOT NULL and partitions
@ 2017-02-10 06:03 amit <[email protected]>
0 siblings, 0 replies; 53+ messages in thread
From: amit @ 2017-02-10 06:03 UTC (permalink / raw)
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
--------------434C61868FD2E7C005F82712
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"
^ permalink raw reply [nested|flat] 53+ messages in thread
* [PATCH 2/3] Add a note about DROP NOT NULL and partitions
@ 2017-02-10 06:03 amit <[email protected]>
0 siblings, 0 replies; 53+ messages in thread
From: amit @ 2017-02-10 06:03 UTC (permalink / raw)
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
--------------434C61868FD2E7C005F82712
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"
^ permalink raw reply [nested|flat] 53+ messages in thread
* [PATCH 2/3] Add a note about DROP NOT NULL and partitions
@ 2017-02-10 06:03 amit <[email protected]>
0 siblings, 0 replies; 53+ messages in thread
From: amit @ 2017-02-10 06:03 UTC (permalink / raw)
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"
^ permalink raw reply [nested|flat] 53+ messages in thread
* [PATCH 2/3] Add a note about DROP NOT NULL and partitions
@ 2017-02-10 06:03 amit <[email protected]>
0 siblings, 0 replies; 53+ messages in thread
From: amit @ 2017-02-10 06:03 UTC (permalink / raw)
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"
^ permalink raw reply [nested|flat] 53+ messages in thread
* [PATCH 2/3] Add a note about DROP NOT NULL and partitions
@ 2017-02-10 06:03 amit <[email protected]>
0 siblings, 0 replies; 53+ messages in thread
From: amit @ 2017-02-10 06:03 UTC (permalink / raw)
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
--------------434C61868FD2E7C005F82712
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"
^ permalink raw reply [nested|flat] 53+ messages in thread
* [PATCH 2/3] Add a note about DROP NOT NULL and partitions
@ 2017-02-10 06:03 amit <[email protected]>
0 siblings, 0 replies; 53+ messages in thread
From: amit @ 2017-02-10 06:03 UTC (permalink / raw)
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"
^ permalink raw reply [nested|flat] 53+ messages in thread
* [PATCH 4/4] Add a note about DROP NOT NULL and partitions
@ 2017-02-10 06:03 amit <[email protected]>
0 siblings, 0 replies; 53+ messages in thread
From: amit @ 2017-02-10 06:03 UTC (permalink / raw)
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--
^ permalink raw reply [nested|flat] 53+ messages in thread
* [PATCH 2/3] Add a note about DROP NOT NULL and partitions
@ 2017-02-10 06:03 amit <[email protected]>
0 siblings, 0 replies; 53+ messages in thread
From: amit @ 2017-02-10 06:03 UTC (permalink / raw)
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
--------------434C61868FD2E7C005F82712
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"
^ permalink raw reply [nested|flat] 53+ messages in thread
* [PATCH 2/3] Add a note about DROP NOT NULL and partitions
@ 2017-02-10 06:03 amit <[email protected]>
0 siblings, 0 replies; 53+ messages in thread
From: amit @ 2017-02-10 06:03 UTC (permalink / raw)
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
--------------434C61868FD2E7C005F82712
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"
^ permalink raw reply [nested|flat] 53+ messages in thread
* [PATCH 4/4] Add a note about DROP NOT NULL and partitions
@ 2017-02-10 06:03 amit <[email protected]>
0 siblings, 0 replies; 53+ messages in thread
From: amit @ 2017-02-10 06:03 UTC (permalink / raw)
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--
^ permalink raw reply [nested|flat] 53+ messages in thread
* [PATCH 2/3] Add a note about DROP NOT NULL and partitions
@ 2017-02-10 06:03 amit <[email protected]>
0 siblings, 0 replies; 53+ messages in thread
From: amit @ 2017-02-10 06:03 UTC (permalink / raw)
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
--------------434C61868FD2E7C005F82712
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"
^ permalink raw reply [nested|flat] 53+ messages in thread
* [PATCH 2/3] Add a note about DROP NOT NULL and partitions
@ 2017-02-10 06:03 amit <[email protected]>
0 siblings, 0 replies; 53+ messages in thread
From: amit @ 2017-02-10 06:03 UTC (permalink / raw)
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"
^ permalink raw reply [nested|flat] 53+ messages in thread
* [PATCH 2/3] Add a note about DROP NOT NULL and partitions
@ 2017-02-10 06:03 amit <[email protected]>
0 siblings, 0 replies; 53+ messages in thread
From: amit @ 2017-02-10 06:03 UTC (permalink / raw)
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
--------------434C61868FD2E7C005F82712
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"
^ permalink raw reply [nested|flat] 53+ messages in thread
* [PATCH 2/3] Add a note about DROP NOT NULL and partitions
@ 2017-02-10 06:03 amit <[email protected]>
0 siblings, 0 replies; 53+ messages in thread
From: amit @ 2017-02-10 06:03 UTC (permalink / raw)
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"
^ permalink raw reply [nested|flat] 53+ messages in thread
* [PATCH v4] contrib/sslinfo: Add ssl_group_info
@ 2026-02-19 15:33 Dmitrii Dolgov <[email protected]>
0 siblings, 0 replies; 53+ messages in thread
From: Dmitrii Dolgov @ 2026-02-19 15:33 UTC (permalink / raw)
Add a new function to sslinfo ssl_group_info to show SSL groups,
including negotiated, supported and shared. It's useful for diagnostic
purposes, to identify what's being used and supported, e.g. which key
share is being negotiated. Few examples, for openssl 3.2.4:
select * from ssl_group_info();
type | name
------------+--------------------
negotiated | X25519MLKEM768
shared | X25519MLKEM768
shared | x25519
supported | X25519MLKEM768
supported | x25519
[...]
The implementation is inspired by ssl_print_groups from openssl.
---
contrib/sslinfo/Makefile | 2 +-
contrib/sslinfo/meson.build | 1 +
contrib/sslinfo/sslinfo--1.2--1.3.sql | 10 ++
contrib/sslinfo/sslinfo.c | 167 +++++++++++++++++++++++++-
contrib/sslinfo/sslinfo.control | 2 +-
doc/src/sgml/sslinfo.sgml | 45 +++++++
src/tools/pgindent/typedefs.list | 1 +
7 files changed, 225 insertions(+), 3 deletions(-)
create mode 100644 contrib/sslinfo/sslinfo--1.2--1.3.sql
diff --git a/contrib/sslinfo/Makefile b/contrib/sslinfo/Makefile
index 14305594e2d..d968ef2abfd 100644
--- a/contrib/sslinfo/Makefile
+++ b/contrib/sslinfo/Makefile
@@ -6,7 +6,7 @@ OBJS = \
sslinfo.o
EXTENSION = sslinfo
-DATA = sslinfo--1.2.sql sslinfo--1.1--1.2.sql sslinfo--1.0--1.1.sql
+DATA = sslinfo--1.2.sql sslinfo--1.2--1.3.sql sslinfo--1.1--1.2.sql sslinfo--1.0--1.1.sql
PGFILEDESC = "sslinfo - information about client SSL certificate"
ifdef USE_PGXS
diff --git a/contrib/sslinfo/meson.build b/contrib/sslinfo/meson.build
index 6e9cb96430a..27737562925 100644
--- a/contrib/sslinfo/meson.build
+++ b/contrib/sslinfo/meson.build
@@ -26,6 +26,7 @@ install_data(
'sslinfo--1.0--1.1.sql',
'sslinfo--1.1--1.2.sql',
'sslinfo--1.2.sql',
+ 'sslinfo--1.2--1.3.sql',
'sslinfo.control',
kwargs: contrib_data_args,
)
diff --git a/contrib/sslinfo/sslinfo--1.2--1.3.sql b/contrib/sslinfo/sslinfo--1.2--1.3.sql
new file mode 100644
index 00000000000..40fd0ea2b9c
--- /dev/null
+++ b/contrib/sslinfo/sslinfo--1.2--1.3.sql
@@ -0,0 +1,10 @@
+/* contrib/sslinfo/sslinfo--1.2--1.3.sql */
+
+-- complain if script is sourced in psql, rather than via ALTER EXTENSION
+\echo Use "ALTER EXTENSION sslinfo UPDATE TO '1.3'" to load this file. \quit
+
+CREATE FUNCTION
+ssl_group_info(OUT group_type text, OUT name text
+) RETURNS SETOF record
+AS 'MODULE_PATHNAME', 'ssl_group_info'
+LANGUAGE C STRICT PARALLEL RESTRICTED;
diff --git a/contrib/sslinfo/sslinfo.c b/contrib/sslinfo/sslinfo.c
index 2b9eb90b093..e018010d4be 100644
--- a/contrib/sslinfo/sslinfo.c
+++ b/contrib/sslinfo/sslinfo.c
@@ -28,13 +28,28 @@ static Datum X509_NAME_field_to_text(X509_NAME *name, text *fieldName);
static Datum ASN1_STRING_to_text(ASN1_STRING *str);
/*
- * Function context for data persisting over repeated calls.
+ * Function context for data persisting over repeated calls of
+ * ssl_extension_info.
*/
typedef struct
{
TupleDesc tupdesc;
} SSLExtensionInfoContext;
+/*
+ * Function context for data persisting over repeated calls of
+ * ssl_group_info.
+ */
+typedef struct
+{
+ TupleDesc tupdesc;
+ int nshared;
+ int nsupported;
+
+ /* Supported groups have to be stored separately */
+ int *supported_groups;
+} SSLGroupInfoContext;
+
/*
* Indicates whether current session uses SSL
*
@@ -474,3 +489,153 @@ ssl_extension_info(PG_FUNCTION_ARGS)
/* All done */
SRF_RETURN_DONE(funcctx);
}
+
+/*
+ * Returns information about TLS groups.
+ *
+ * Returns setof record made of the following values:
+ * - type of the group: negotiated, shared, supported.
+ * - name of the group.
+ */
+PG_FUNCTION_INFO_V1(ssl_group_info);
+Datum
+ssl_group_info(PG_FUNCTION_ARGS)
+{
+ SSL *ssl = MyProcPort->ssl;
+ FuncCallContext *funcctx;
+ int call_cntr = 0;
+ int max_calls = 0;
+ MemoryContext oldcontext;
+ SSLGroupInfoContext *fctx;
+
+ if (SRF_IS_FIRSTCALL())
+ {
+
+ TupleDesc tupdesc;
+
+ /* create a function context for cross-call persistence */
+ funcctx = SRF_FIRSTCALL_INIT();
+
+ /*
+ * Switch to memory context appropriate for multiple function calls
+ */
+ oldcontext = MemoryContextSwitchTo(funcctx->multi_call_memory_ctx);
+
+ /* Create a user function context for cross-call persistence */
+ fctx = palloc_object(SSLGroupInfoContext);
+
+ /* Construct tuple descriptor */
+ if (get_call_result_type(fcinfo, NULL, &tupdesc) != TYPEFUNC_COMPOSITE)
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("function returning record called in context that cannot accept type record")));
+ fctx->tupdesc = BlessTupleDesc(tupdesc);
+
+ if (!MyProcPort->ssl_in_use)
+ {
+ /* fast track when no results */
+ MemoryContextSwitchTo(oldcontext);
+ SRF_RETURN_DONE(funcctx);
+ }
+
+ if (ssl != NULL)
+ {
+ fctx->nsupported = SSL_get1_groups(ssl, NULL);
+ fctx->nshared = SSL_get_shared_group(ssl, -1);
+
+ fctx->supported_groups =
+ palloc(fctx->nsupported * sizeof(*fctx->supported_groups));
+ SSL_get1_groups(ssl, fctx->supported_groups);
+
+ /*
+ * Set max_calls as the number of supported groups plus the number
+ * of shared groups plus one negotiated group.
+ */
+ max_calls = fctx->nsupported + fctx->nshared + 1;
+ }
+
+ if (max_calls > 0)
+ {
+ /* got results, keep track of them */
+ funcctx->max_calls = max_calls;
+ funcctx->user_fctx = fctx;
+ }
+ else
+ {
+ /* fast track when no results */
+ MemoryContextSwitchTo(oldcontext);
+ SRF_RETURN_DONE(funcctx);
+ }
+
+ MemoryContextSwitchTo(oldcontext);
+ }
+
+ /* stuff done on every call of the function */
+ funcctx = SRF_PERCALL_SETUP();
+
+ /*
+ * Initialize per-call variables.
+ */
+ call_cntr = funcctx->call_cntr;
+ max_calls = funcctx->max_calls;
+ fctx = funcctx->user_fctx;
+
+ /* do while there are more left to send */
+ if (call_cntr < max_calls)
+ {
+ Datum values[2];
+ bool nulls[2];
+ HeapTuple tuple;
+ Datum result,
+ group_type;
+ int nid;
+ const char *group_name;
+
+ /* Send the negotiated group first */
+ if (call_cntr == 0)
+ {
+ nid = SSL_get_negotiated_group(ssl);
+ group_type = CStringGetTextDatum("negotiated");
+ }
+ /* Then the shared groups */
+ else if (call_cntr < fctx->nshared + 1)
+ {
+ nid = SSL_get_shared_group(ssl, call_cntr - 1);
+ group_type = CStringGetTextDatum("shared");
+ }
+ /* And finally the supported groups */
+ else if (call_cntr < fctx->nsupported + fctx->nshared + 1)
+ {
+ nid = fctx->supported_groups[call_cntr - fctx->nshared - 1];
+ group_type = CStringGetTextDatum("supported");
+ }
+ else
+ SRF_RETURN_DONE(funcctx);
+
+ /*
+ * SSL_group_to_name can return NULL in case of an error, e.g. when no
+ * such name was registered for some reason.
+ */
+ group_name = SSL_group_to_name(ssl, nid);
+ if (group_name == NULL)
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("unknown OpenSSL group at position %d",
+ call_cntr)));
+
+ values[0] = group_type;
+ nulls[0] = false;
+
+ values[1] = CStringGetTextDatum(group_name);
+ nulls[1] = false;
+
+ /* Build tuple */
+ tuple = heap_form_tuple(fctx->tupdesc, values, nulls);
+ result = HeapTupleGetDatum(tuple);
+
+ SRF_RETURN_NEXT(funcctx, result);
+ }
+
+ /* All done */
+ SRF_RETURN_DONE(funcctx);
+}
diff --git a/contrib/sslinfo/sslinfo.control b/contrib/sslinfo/sslinfo.control
index c7754f924cf..b53e95b7da8 100644
--- a/contrib/sslinfo/sslinfo.control
+++ b/contrib/sslinfo/sslinfo.control
@@ -1,5 +1,5 @@
# sslinfo extension
comment = 'information about SSL certificates'
-default_version = '1.2'
+default_version = '1.3'
module_pathname = '$libdir/sslinfo'
relocatable = true
diff --git a/doc/src/sgml/sslinfo.sgml b/doc/src/sgml/sslinfo.sgml
index 85d49f66537..422745de37c 100644
--- a/doc/src/sgml/sslinfo.sgml
+++ b/doc/src/sgml/sslinfo.sgml
@@ -240,6 +240,51 @@ emailAddress
</para>
</listitem>
</varlistentry>
+
+ <varlistentry>
+ <term>
+ <function>ssl_group_info() returns setof record</function>
+ <indexterm>
+ <primary>ssl_group_info</primary>
+ </indexterm>
+ </term>
+ <listitem>
+ <para>
+ Provide information about TLS groups: group type and group name.
+ The group type value could be one of the following:
+
+ <variablelist>
+ <varlistentry id="ssl-group-info-negotiated">
+ <term><literal>negotiated</literal></term>
+ <listitem>
+ <para>
+ The group used for the handshake key exchange process.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry id="ssl-group-info-shared">
+ <term><literal>shared</literal></term>
+ <listitem>
+ <para>
+ Lisf of named groups shared with the server side.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry id="ssl-group-info-supported">
+ <term><literal>supported</literal></term>
+ <listitem>
+ <para>
+ list of named groups supported by the client for key exchange in the
+ form of "supported_groups" extension.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </para>
+ </listitem>
+ </varlistentry>
</variablelist>
</sect2>
diff --git a/src/tools/pgindent/typedefs.list b/src/tools/pgindent/typedefs.list
index 52f8603a7be..b5ea3c18291 100644
--- a/src/tools/pgindent/typedefs.list
+++ b/src/tools/pgindent/typedefs.list
@@ -2720,6 +2720,7 @@ SQLValueFunction
SQLValueFunctionOp
SSL
SSLExtensionInfoContext
+SSLGroupInfoContext
SSL_CTX
STARTUPINFO
STRLEN
base-commit: e82fc27e095b5a84c578b6e6b43b3396463bd812
--
2.52.0
--eajje57lwcd22geu--
^ permalink raw reply [nested|flat] 53+ messages in thread
end of thread, other threads:[~2026-02-19 15:33 UTC | newest]
Thread overview: 53+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-02-10 06:03 [PATCH 2/3] Add a note about DROP NOT NULL and partitions amit <[email protected]>
2017-02-10 06:03 [PATCH 4/4] Add a note about DROP NOT NULL and partitions amit <[email protected]>
2017-02-10 06:03 [PATCH 4/4] Add a note about DROP NOT NULL and partitions amit <[email protected]>
2017-02-10 06:03 [PATCH 4/4] Add a note about DROP NOT NULL and partitions amit <[email protected]>
2017-02-10 06:03 [PATCH 2/3] Add a note about DROP NOT NULL and partitions amit <[email protected]>
2017-02-10 06:03 [PATCH 2/3] Add a note about DROP NOT NULL and partitions amit <[email protected]>
2017-02-10 06:03 [PATCH 2/3] Add a note about DROP NOT NULL and partitions amit <[email protected]>
2017-02-10 06:03 [PATCH 2/3] Add a note about DROP NOT NULL and partitions amit <[email protected]>
2017-02-10 06:03 [PATCH 4/4] Add a note about DROP NOT NULL and partitions amit <[email protected]>
2017-02-10 06:03 [PATCH 4/4] Add a note about DROP NOT NULL and partitions amit <[email protected]>
2017-02-10 06:03 [PATCH 2/3] Add a note about DROP NOT NULL and partitions amit <[email protected]>
2017-02-10 06:03 [PATCH 2/3] Add a note about DROP NOT NULL and partitions amit <[email protected]>
2017-02-10 06:03 [PATCH 4/4] Add a note about DROP NOT NULL and partitions amit <[email protected]>
2017-02-10 06:03 [PATCH 4/4] Add a note about DROP NOT NULL and partitions amit <[email protected]>
2017-02-10 06:03 [PATCH 2/3] Add a note about DROP NOT NULL and partitions amit <[email protected]>
2017-02-10 06:03 [PATCH 2/3] Add a note about DROP NOT NULL and partitions amit <[email protected]>
2017-02-10 06:03 [PATCH 4/4] Add a note about DROP NOT NULL and partitions amit <[email protected]>
2017-02-10 06:03 [PATCH 2/3] Add a note about DROP NOT NULL and partitions amit <[email protected]>
2017-02-10 06:03 [PATCH 4/4] Add a note about DROP NOT NULL and partitions amit <[email protected]>
2017-02-10 06:03 [PATCH 2/3] Add a note about DROP NOT NULL and partitions amit <[email protected]>
2017-02-10 06:03 [PATCH 2/3] Add a note about DROP NOT NULL and partitions amit <[email protected]>
2017-02-10 06:03 [PATCH 4/4] Add a note about DROP NOT NULL and partitions amit <[email protected]>
2017-02-10 06:03 [PATCH 4/4] Add a note about DROP NOT NULL and partitions amit <[email protected]>
2017-02-10 06:03 [PATCH 2/3] Add a note about DROP NOT NULL and partitions amit <[email protected]>
2017-02-10 06:03 [PATCH 4/4] Add a note about DROP NOT NULL and partitions amit <[email protected]>
2017-02-10 06:03 [PATCH 4/4] Add a note about DROP NOT NULL and partitions amit <[email protected]>
2017-02-10 06:03 [PATCH 2/3] Add a note about DROP NOT NULL and partitions amit <[email protected]>
2017-02-10 06:03 [PATCH 2/3] Add a note about DROP NOT NULL and partitions amit <[email protected]>
2017-02-10 06:03 [PATCH 2/3] Add a note about DROP NOT NULL and partitions amit <[email protected]>
2017-02-10 06:03 [PATCH 2/3] Add a note about DROP NOT NULL and partitions amit <[email protected]>
2017-02-10 06:03 [PATCH 4/4] Add a note about DROP NOT NULL and partitions amit <[email protected]>
2017-02-10 06:03 [PATCH 4/4] Add a note about DROP NOT NULL and partitions amit <[email protected]>
2017-02-10 06:03 [PATCH 2/3] Add a note about DROP NOT NULL and partitions amit <[email protected]>
2017-02-10 06:03 [PATCH 4/4] Add a note about DROP NOT NULL and partitions amit <[email protected]>
2017-02-10 06:03 [PATCH 2/3] Add a note about DROP NOT NULL and partitions amit <[email protected]>
2017-02-10 06:03 [PATCH 2/3] Add a note about DROP NOT NULL and partitions amit <[email protected]>
2017-02-10 06:03 [PATCH 2/3] Add a note about DROP NOT NULL and partitions amit <[email protected]>
2017-02-10 06:03 [PATCH 2/3] Add a note about DROP NOT NULL and partitions amit <[email protected]>
2017-02-10 06:03 [PATCH 2/3] Add a note about DROP NOT NULL and partitions amit <[email protected]>
2017-02-10 06:03 [PATCH 2/3] Add a note about DROP NOT NULL and partitions amit <[email protected]>
2017-02-10 06:03 [PATCH 2/3] Add a note about DROP NOT NULL and partitions amit <[email protected]>
2017-02-10 06:03 [PATCH 2/3] Add a note about DROP NOT NULL and partitions amit <[email protected]>
2017-02-10 06:03 [PATCH 2/3] Add a note about DROP NOT NULL and partitions amit <[email protected]>
2017-02-10 06:03 [PATCH 2/3] Add a note about DROP NOT NULL and partitions amit <[email protected]>
2017-02-10 06:03 [PATCH 4/4] Add a note about DROP NOT NULL and partitions amit <[email protected]>
2017-02-10 06:03 [PATCH 2/3] Add a note about DROP NOT NULL and partitions amit <[email protected]>
2017-02-10 06:03 [PATCH 2/3] Add a note about DROP NOT NULL and partitions amit <[email protected]>
2017-02-10 06:03 [PATCH 4/4] Add a note about DROP NOT NULL and partitions amit <[email protected]>
2017-02-10 06:03 [PATCH 2/3] Add a note about DROP NOT NULL and partitions amit <[email protected]>
2017-02-10 06:03 [PATCH 2/3] Add a note about DROP NOT NULL and partitions amit <[email protected]>
2017-02-10 06:03 [PATCH 2/3] Add a note about DROP NOT NULL and partitions amit <[email protected]>
2017-02-10 06:03 [PATCH 2/3] Add a note about DROP NOT NULL and partitions amit <[email protected]>
2026-02-19 15:33 [PATCH v4] contrib/sslinfo: Add ssl_group_info Dmitrii Dolgov <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox