Thread: No details on how to use Hash partitions: no example, no syntax

No details on how to use Hash partitions: no example, no syntax

From
PG Doc comments form
Date:
The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/16/ddl-partitioning.html
Description:

I would like the documentation to explain how to use Hash partitions. It
says one needs to provide a modulus and remainder, but the exact syntax is
not stated in the relevant documentation page 5.11

Re: No details on how to use Hash partitions: no example, no syntax

From
Laurenz Albe
Date:
On Tue, 2024-09-17 at 22:32 +0000, PG Doc comments form wrote:
> The following documentation comment has been logged on the website:
>
> Page: https://www.postgresql.org/docs/16/ddl-partitioning.html
> Description:
>
> I would like the documentation to explain how to use Hash partitions. It
> says one needs to provide a modulus and remainder, but the exact syntax is
> not stated in the relevant documentation page 5.11

All that is documented with CREATE TABLE:
https://www.postgresql.org/docs/current/sql-createtable.html

"How to use" is material for a tutorial rather than for the documentation.

Yours,
Laurenz Albe



Re: No details on how to use Hash partitions: no example, no syntax

From
David Rowley
Date:
On Thu, 19 Sept 2024 at 02:17, Laurenz Albe <laurenz.albe@cybertec.at> wrote:
>
> On Tue, 2024-09-17 at 22:32 +0000, PG Doc comments form wrote:
> > I would like the documentation to explain how to use Hash partitions. It
> > says one needs to provide a modulus and remainder, but the exact syntax is
> > not stated in the relevant documentation page 5.11
>
> All that is documented with CREATE TABLE:
> https://www.postgresql.org/docs/current/sql-createtable.html
>
> "How to use" is material for a tutorial rather than for the documentation.

I see we also had a similar complaint back in May [1].

From the v16 docs, "See CREATE TABLE for more details on creating
partitioned tables and partitions." is mentioned in 5.11.2.
Declarative Partitioning, but I wonder if it's worth adding "There are
further examples on how to create partitioned tables in the examples
section of CREATE TABLE" at the end of the examples section in
"5.11.2.1. Example".  Would people be more likely to see the link if
we put it in the place where they might expect the missing examples to
be?

David

[1] https://www.postgresql.org/message-id/171475325175.701.1942360200122734951@wrigleys.postgresql.org