pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: User <ya@penek.org>
To: pgsql-general@lists.postgresql.org
Subject: Table partition with primary key in 11.3
Date: Wed, 22 May 2019 20:46:39 +0300
Message-ID: <94935ac5-2f65-3c41-c14d-1b13da8e19ca@penek.org> (raw)

CREATE TABLE public.test1 (
     x1 integer NOT NULL,
     x2 integer NOT NULL,
     CONSTRAINT test1_pkey PRIMARY KEY (x1) INCLUDE(x2)
) PARTITION BY RANGE (x2);

This query works in 11.1 but fails in 11.3 with messages:

ERROR: insufficient columns in PRIMARY KEY constraint definition
DETAIL: PRIMARY KEY constraint on table "test1" lacks column "x2" which 
is part of the partition key.
SQL state: 0A000







view thread (19+ messages)  latest in thread

Message-ID: <94935ac5-2f65-3c41-c14d-1b13da8e19ca@penek.org>
Permalink:  ../94935ac5-2f65-3c41-c14d-1b13da8e19ca@penek.org/
Also on:    postgresql.org/message-id/94935ac5-2f65-3c41-c14d-1b13da8e19ca@penek.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: ya@penek.org
  Subject: Re: Table partition with primary key in 11.3
  In-Reply-To: <94935ac5-2f65-3c41-c14d-1b13da8e19ca@penek.org>
  References: <94935ac5-2f65-3c41-c14d-1b13da8e19ca@penek.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox