Range partitioning and overlap
Range partitioning and overlap
The table is partitioned into “ranges” defined by a key column or set of columns, with no overlap between the ranges of values assigned to different partitions. For example, one might partition by date ranges, or by ranges of identifiers for particular business objects."
CREATE TABLE measurement_y2006m02 PARTITION OF measurement
FOR VALUES FROM ('2006-02-01') TO ('2006-03-01');
CREATE TABLE measurement_y2006m03 PARTITION OF measurement
FOR VALUES FROM ('2006-03-01') TO ('2006-04-01');
...
CREATE TABLE measurement_y2007m11 PARTITION OF measurement
FOR VALUES FROM ('2007-11-01') TO ('2007-12-01');
CREATE TABLE measurement_y2007m12 PARTITION OF measurement
FOR VALUES FROM ('2007-12-01') TO ('2008-01-01')
TABLESPACE fasttablespace;Re: Range partitioning and overlap
"Range Partitioning
The table is partitioned into “ranges” defined by a key column or set of columns, with no overlap between the ranges of values assigned to different partitions. For example, one might partition by date ranges, or by ranges of identifiers for particular business objects."
Is there a misinterpretation from my side, or examples are inconsistent with the paragraph above?
RE: Range partitioning and overlap
De: David G. Johnston <david.g.johnston@gmail.com>
Enviado: sexta-feira, 13 de novembro de 2020 17:32
Para: Edson Richter <edsonrichter@hotmail.com>
Cc: pgsql-general <pgsql-general@postgresql.org>
Assunto: Re: Range partitioning and overlapOn Fri, Nov 13, 2020 at 1:29 PM Edson Richter <edsonrichter@hotmail.com> wrote:"Range Partitioning
The table is partitioned into “ranges” defined by a key column or set of columns, with no overlap between the ranges of values assigned to different partitions. For example, one might partition by date ranges, or by ranges of identifiers for particular business objects."
Is there a misinterpretation from my side, or examples are inconsistent with the paragraph above?Further on the documentation: "When creating a range partition, the lower bound specified with FROM is an inclusive bound, whereas the upper bound specified with TO is an exclusive bound."David J.
Re: Range partitioning and overlap
Edson Richter writes: > Further on the documentation: "When creating a range partition, the lower bound specified with FROM is an inclusive bound, whereas the upper bound specified with TO is an exclusive bound." > I'm pretty sure I cannot find this statement in PostgreSQL 13 documentation page about partitioning. May be this statement is in another page? It's in the CREATE TABLE reference page. Seems like it would be a good idea to have it also in ddl.sgml's discussion of partitioning, though. regards, tom lane
RE: Range partitioning and overlap
De: Tom Lane <tgl@sss.pgh.pa.us>Enviado: sexta-feira, 13 de novembro de 2020 17:58
Para: Edson Richter <edsonrichter@hotmail.com>
Cc: David G. Johnston <david.g.johnston@gmail.com>; pgsql-general <pgsql-general@postgresql.org>
Assunto: Re: Range partitioning and overlapEdson Richter <edsonrichter@hotmail.com> writes:
> Further on the documentation: "When creating a range partition, the lower bound specified with FROM is an inclusive bound, whereas the upper bound specified with TO is an exclusive bound."
> I'm pretty sure I cannot find this statement in PostgreSQL 13 documentation page about partitioning. May be this statement is in another page?
It's in the CREATE TABLE reference page. Seems like it would be a good
idea to have it also in ddl.sgml's discussion of partitioning, though.regards, tom lane
Re: Range partitioning and overlap
De: Tom Lane <tgl@sss.pgh.pa.us>Enviado: sexta-feira, 13 de novembro de 2020 17:58
Para: Edson Richter <edsonrichter@hotmail.com>
Cc: David G. Johnston <david.g.johnston@gmail.com>; pgsql-general <pgsql-general@postgresql.org>
Assunto: Re: Range partitioning and overlapEdson Richter <edsonrichter@hotmail.com> writes:
> Further on the documentation: "When creating a range partition, the lower bound specified with FROM is an inclusive bound, whereas the upper bound specified with TO is an exclusive bound."
> I'm pretty sure I cannot find this statement in PostgreSQL 13 documentation page about partitioning. May be this statement is in another page?
It's in the CREATE TABLE reference page. Seems like it would be a good
idea to have it also in ddl.sgml's discussion of partitioning, though.