On 2019-Aug-07, Tom Lane wrote: > Alvaro Herrera <alvhe...@2ndquadrant.com> writes: > > Actually, it also says this (in the blurb for the PARTITION OF clause): > > > Creates the table as a <firstterm>partition</firstterm> of the > > specified > > parent table. The table can be created either as a partition for > > specific > > values using <literal>FOR VALUES</literal> or as a default partition > > using <literal>DEFAULT</literal>. This option is not available for > > hash-partitioned tables. > > > which I think is sufficient. > > Hm, that's rather confusingly worded IMO. Is the antecedent of "this > option" just DEFAULT, or does it mean that you can't use FOR VALUES, > or perchance it means that you can't use a PARTITION OF clause > at all?
Uh, you're right, I hadn't noticed that. Not my text. I think this can be fixed easily as in the attached. There are other options, but I like this one the best. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
diff --git a/doc/src/sgml/ref/create_table.sgml b/doc/src/sgml/ref/create_table.sgml index 9009addb9c..a74fde42d4 100644 --- a/doc/src/sgml/ref/create_table.sgml +++ b/doc/src/sgml/ref/create_table.sgml @@ -399,8 +399,7 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM Creates the table as a <firstterm>partition</firstterm> of the specified parent table. The table can be created either as a partition for specific values using <literal>FOR VALUES</literal> or as a default partition - using <literal>DEFAULT</literal>. This option is not available for - hash-partitioned tables. + using <literal>DEFAULT</literal>. </para> <para> @@ -491,8 +490,8 @@ WITH ( MODULUS <replaceable class="parameter">numeric_literal</replaceable>, REM <para> If <literal>DEFAULT</literal> is specified, the table will be - created as a default partition of the parent table. The parent can - either be a list or range partitioned table. A partition key value + created as a default partition of the parent table. This option + is not available for hash-partitioned tables. A partition key value not fitting into any other partition of the given parent will be routed to the default partition. There can be only one default partition for a given parent table.