Postgres 11: Table Partitioning and Primary Keys

From: PG Doc comments form <noreply(at)postgresql(dot)org>
To: pgsql-docs(at)lists(dot)postgresql(dot)org
Cc: phil(dot)bayer(at)gmail(dot)com
Subject: Postgres 11: Table Partitioning and Primary Keys
Date: 2019-07-05 21:20:07
Message-ID: 156236160709.1192.4498528196556144085@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs pgsql-hackers

The following documentation comment has been logged on the website:

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

In the documentation for Postgres 11 table partitioning, there is no mention
of the requirement that the Primary Key of a partitioned table must contain
the partition key.
In fact the documentation on primary keys is so light that I am not even
100% sure the above is correct. If the following table is not possible in
Postgres 11, the documentation should find some way to make that clear.

-- Create partitioned table with partition key not in primary key
create table events (
id bigint not null default nextval('events_id_seq'),
created_date timestamp not null,
constraint events_pk primary key (id)
) partition by range (created_date);
-- end create table

I believe this should be documented in section "5.10.2.3. Limitations"

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Jürgen Purtz 2019-07-07 13:18:04 Improvement of GIN figure
Previous Message PG Doc comments form 2019-07-04 14:01:06 Documentation about physical replication

Browse pgsql-hackers by date

  From Date Subject
Next Message David Fetter 2019-07-05 21:29:03 Re: [PATCH v4] Add \warn to psql
Previous Message Bruce Momjian 2019-07-05 21:07:21 Re: [Proposal] Table-level Transparent Data Encryption (TDE) and Key Management Service (KMS)