On 2018/01/19 23:55, Alvaro Herrera wrote:
> Local partitioned indexes
>
> Modified Files
> --------------
> doc/src/sgml/catalogs.sgml                |  23 +
> doc/src/sgml/ref/alter_index.sgml         |  14 +
> doc/src/sgml/ref/alter_table.sgml         |   8 +-
> doc/src/sgml/ref/create_index.sgml        |  33 +-
> doc/src/sgml/ref/reindex.sgml             |   5 +

I noticed that the declarative partitioning section in ddl.sgml hasn't
been updated to reflect the features added by this commit.  Attached patch
is an attempt to fix that.

Thanks,
Amit
From 2007545c0d1c1cdfac079161a108a086091e8735 Mon Sep 17 00:00:00 2001
From: amit <amitlangot...@gmail.com>
Date: Mon, 29 Jan 2018 16:59:03 +0900
Subject: [PATCH v1] Update ddl.sgml to reflect features added in 8b08f7d4820

---
 doc/src/sgml/ddl.sgml | 21 +++++++++++++++------
 1 file changed, 15 insertions(+), 6 deletions(-)

diff --git a/doc/src/sgml/ddl.sgml b/doc/src/sgml/ddl.sgml
index 1e1f3428a6..9959e7ae6c 100644
--- a/doc/src/sgml/ddl.sgml
+++ b/doc/src/sgml/ddl.sgml
@@ -3159,6 +3159,18 @@ CREATE INDEX ON measurement_y2007m12 (logdate);
 CREATE INDEX ON measurement_y2008m01 (logdate);
 </programlisting>
       </para>
+
+      <para>
+       Alternatively, you can simply create the index in the parent table,
+       which is same as creating it in every partition that is currently
+       defined.  Moreover, once created in the parent table, the index is
+       automatically created in partitions that will be added in the future.
+      </para>
+
+<programlisting>
+CREATE INDEX ON measurement (logdate);
+</programlisting>
+      </para>
      </listitem>
 
       <listitem>
@@ -3273,12 +3285,9 @@ ALTER TABLE measurement ATTACH PARTITION 
measurement_y2008m02
     <itemizedlist>
      <listitem>
       <para>
-       There is no facility available to create the matching indexes on all
-       partitions automatically.  Indexes must be added to each partition with
-       separate commands.  This also means that there is no way to create a
-       primary key, unique constraint, or exclusion constraint spanning all
-       partitions; it is only possible to constrain each leaf partition
-       individually.
+       There is no way to create a primary key, unique constraint, or
+       exclusion constraint spanning all partitions; it is only possible
+       to constrain each leaf partition individually.
       </para>
      </listitem>
 
-- 
2.11.0

Reply via email to