public inbox for [email protected]  
help / color / mirror / Atom feed
From: David Rowley <[email protected]>
To: Inzamam Shafiq <[email protected]>
Cc: Tom Lane <[email protected]>
Cc: Steve Midgley <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: ON CONFLICT clause NOT working on Partition Table PostgreSQL 12
Date: Tue, 20 Sep 2022 21:46:07 +1200
Message-ID: <CAApHDvoVCXU8_S46VBX6j+ff6n-dHLb6jNnfUF094db9ccBjKg@mail.gmail.com> (raw)
In-Reply-To: <AM9P251MB03309E0FC9FFEC4552F81ED298489@AM9P251MB0330.EURP251.PROD.OUTLOOK.COM>
References: <AM9P251MB033090199F1A3C2B1742A50A98499@AM9P251MB0330.EURP251.PROD.OUTLOOK.COM>
	<CAJexoS+F37aQStLD4chj51EhtLyUWFNTtC4Vduq4XqR_bFwYCQ@mail.gmail.com>
	<AM9P251MB0330200D3E9C4875862B10E898489@AM9P251MB0330.EURP251.PROD.OUTLOOK.COM>
	<[email protected]>
	<AM9P251MB03309E0FC9FFEC4552F81ED298489@AM9P251MB0330.EURP251.PROD.OUTLOOK.COM>

On Fri, 16 Sept 2022 at 19:52, Inzamam Shafiq
<[email protected]> wrote:
> Is there anyway we can create constraint on column only which are not part of partition key?

Unfortunately, there is no way to create a unique or primary key
constraint unless the constraint contains all columns from the
partition key.   This is explained in the limitations section in [1].

If you need such a constraint, then you might want to consider
changing your partition key.

David

[1] https://www.postgresql.org/docs/12/ddl-partitioning.html





view thread (8+ messages)  latest in thread

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 using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: ON CONFLICT clause NOT working on Partition Table PostgreSQL 12
  In-Reply-To: <CAApHDvoVCXU8_S46VBX6j+ff6n-dHLb6jNnfUF094db9ccBjKg@mail.gmail.com>

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

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