|
|
@ -261,43 +261,43 @@ CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } | UNLOGGED ] TABLE [ IF NOT EXI |
|
|
|
any existing partition of that parent. |
|
|
|
any existing partition of that parent. |
|
|
|
</para> |
|
|
|
</para> |
|
|
|
|
|
|
|
|
|
|
|
<note> |
|
|
|
<para> |
|
|
|
<para> |
|
|
|
Each of the values specified in the partition bound specification is |
|
|
|
Each of the values specified in the partition bound specification is |
|
|
|
a literal, <literal>NULL</literal>, or <literal>UNBOUNDED</literal>. |
|
|
|
a literal, <literal>NULL</literal>, or <literal>UNBOUNDED</literal>. |
|
|
|
A literal is either a numeric constant or a string constant that is |
|
|
|
A literal is either a numeric constant or a string constant that is |
|
|
|
coercible to the corresponding partition key column's type. |
|
|
|
coercable to the corresponding partition key column's type. |
|
|
|
</para> |
|
|
|
</para> |
|
|
|
|
|
|
|
|
|
|
|
<para> |
|
|
|
<para> |
|
|
|
When creating a range partition, the lower bound specified with |
|
|
|
When creating a range partition, the lower bound specified with |
|
|
|
<literal>FROM</literal> is an inclusive bound, whereas the upper |
|
|
|
<literal>FROM</literal> is an inclusive bound, whereas the upper bound |
|
|
|
bound specified with <literal>TO</literal> is an exclusive bound. |
|
|
|
specified with <literal>TO</literal> is an exclusive bound. That is, |
|
|
|
That is, the values specified in the <literal>FROM</literal> list |
|
|
|
the values specified in the <literal>FROM</literal> list are accepted |
|
|
|
are accepted values of the corresponding partition key columns in a |
|
|
|
values of the corresponding partition key columns in a given partition, |
|
|
|
given partition, whereas those in the <literal>TO</literal> list are |
|
|
|
whereas those in the <literal>TO</literal> list are not. To be precise, |
|
|
|
not. To be precise, this applies only to the first of the partition |
|
|
|
this applies only to the first of the partition key columns for which |
|
|
|
key columns for which the corresponding values in the <literal>FROM</literal> |
|
|
|
the corresponding values in the <literal>FROM</literal> and |
|
|
|
and <literal>TO</literal> lists are not equal. All rows in a given |
|
|
|
<literal>TO</literal> lists are not equal. All rows in a given |
|
|
|
partition contain the same values for all preceding columns, equal to |
|
|
|
partition contain the same values for all preceding columns, equal to |
|
|
|
those specified in <literal>FROM</literal> and <literal>TO</literal> |
|
|
|
those specified in <literal>FROM</literal> and <literal>TO</literal> |
|
|
|
lists. On the other hand, any subsequent columns are insignificant |
|
|
|
lists. On the other hand, any subsequent columns are insignificant |
|
|
|
as far as implicit partition constraint is concerned. |
|
|
|
as far as implicit partition constraint is concerned. |
|
|
|
</para> |
|
|
|
|
|
|
|
|
|
|
|
Specifying <literal>UNBOUNDED</literal> in <literal>FROM</literal> |
|
|
|
<para> |
|
|
|
signifies <literal>-infinity</literal> as the lower bound of the |
|
|
|
Specifying <literal>UNBOUNDED</literal> in <literal>FROM</literal> |
|
|
|
corresponding column, whereas it signifies <literal>+infinity</literal> |
|
|
|
signifies <literal>-infinity</literal> as the lower bound of the |
|
|
|
as the upper bound when specified in <literal>TO</literal>. |
|
|
|
corresponding column, whereas it signifies <literal>+infinity</literal> |
|
|
|
</para> |
|
|
|
as the upper bound when specified in <literal>TO</literal>. |
|
|
|
|
|
|
|
</para> |
|
|
|
<para> |
|
|
|
|
|
|
|
When creating a list partition, <literal>NULL</literal> can be specified |
|
|
|
<para> |
|
|
|
to signify that the partition allows the partition key column to be null. |
|
|
|
When creating a list partition, <literal>NULL</literal> can be |
|
|
|
However, there cannot be more than one such list partitions for a given |
|
|
|
specified to signify that the partition allows the partition key |
|
|
|
parent table. <literal>NULL</literal> cannot specified for range |
|
|
|
column to be null. However, there cannot be more than one such |
|
|
|
partitions. |
|
|
|
list partition for a given parent table. <literal>NULL</literal> |
|
|
|
</para> |
|
|
|
cannot be specified for range partitions. |
|
|
|
</note> |
|
|
|
</para> |
|
|
|
|
|
|
|
|
|
|
|
<para> |
|
|
|
<para> |
|
|
|
A partition must have the same column names and types as the partitioned |
|
|
|
A partition must have the same column names and types as the partitioned |
|
|
|