Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m1hGB-0006Pp-Fv for pgsql-performance@arkaria.postgresql.org; Fri, 09 Jul 2021 03:33:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1m1hGA-0006xM-BP for pgsql-performance@arkaria.postgresql.org; Fri, 09 Jul 2021 03:33:02 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m1hGA-0006vk-28 for pgsql-performance@lists.postgresql.org; Fri, 09 Jul 2021 03:33:02 +0000 Received: from sonic307-10.consmr.mail.ne1.yahoo.com ([66.163.190.33]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1m1hG4-00066L-Jm for pgsql-performance@postgresql.org; Fri, 09 Jul 2021 03:32:59 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1625801573; bh=hj+MxLATgpjw9mXRek7lNuutG+rIGfvpHg1F5RY+imQ=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From:Subject:Reply-To; b=uD4Y/1i1ONff6ZETwyOSFXXYBvBGbcuJrjUuXWU6k4gyHbu8eRzXfGxIcGNMcHocFeoAUrqEXFU8UquZ1tTgQlJsaiR2mePwf1EisVqVs+FS9jI7QCPHBhukNlXhHuKc5c+xX879SEJqXRvzYmcJml1BXtSqc3Tos0Ab3RQnG8F0rI4jM+hfQ+mpRypUQ5r9A25RkkZOdyyFePHn3U0BdMUn4gXq/6pYCgYAxv2YZClsyRAfaRlKcNkmfS1YE0Wmab/oTZL+2wk1QkU/Azi54QLqZbgaeJGzaJais1q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Q 90GizgaFJq1x2c5GHs_VlDW0.2lMfrccy9JzSbcEb8tlHUEEBft6V X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic307.consmr.mail.ne1.yahoo.com with HTTP; Fri, 9 Jul 2021 03:32:53 +0000 Date: Fri, 9 Jul 2021 03:32:46 +0000 (UTC) From: Nagaraj Raj To: Mike Sofen , 'Alvaro Herrera' , 'Justin Pryzby' Cc: Message-ID: <613808845.2913413.1625801566230@mail.yahoo.com> In-Reply-To: <080901d7744e$ac0f3d70$042db850$@runbox.com> References: <20210708221703.GA1301@telsasoft.com> <202107082228.obnak7c7mx4n@alvherre.pgsql> <080901d7744e$ac0f3d70$042db850$@runbox.com> Subject: Re: Partition column should be part of PK MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_2913412_161807093.1625801566229" X-Mailer: WebService/1.1.18469 YahooMailIosMobile Content-Length: 6211 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk ------=_Part_2913412_161807093.1625801566229 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable My apologies for making confusion with new thread. Yes its same issue relat= ed to earlier post. I was trying to figure out =C2=A0how to ensure unique values for columns (b= illing_account_guid, ban). If i add partition key to constraint , it wont b= e possible what im looking for. My use case as below=C2=A0 INSERT INTO t1=C2=A0SELECT * from t2=C2=A0ON CONFLICT (billing_account_guid= ,ban) DO UPDATE SET something=E2=80=A6 Or INSERT INTO t1=C2=A0SELECT * from t2=C2=A0ON CONFLICT constraint (pk or uk)= (billing_account_guid,ban) DO UPDATE SET something=E2=80=A6 Thanks Sent from Yahoo Mail for iPhone On Thursday, July 8, 2021, 7:12 PM, Mike Sofen wrote: I believe this thread qualifies for the funniest thread of 2021 (so far).= =C2=A0 And yes, this is a top post.=C2=A0 :-) Mike Sofen -----Original Message----- From: Alvaro Herrera =20 Sent: Thursday, July 08, 2021 3:29 PM To: Justin Pryzby Cc: Nagaraj Raj ; pgsql-performance@postgresql.org Subject: Re: Partition column should be part of PK On 2021-Jul-08, Justin Pryzby wrote: > If I'm not wrong, this is the same thing you asked 2 week ago. >=20 > If so, why not continue the conversation on the same thread, and why=20 > not reference the old thread ? >=20 > I went to the effort to find the old conversation. > https://www.postgresql.org/message-id/20210625042228.GJ29179@telsasoft > .com Actually, it looks like you're replying to the same email you replied to tw= o weeks ago. --=20 =C3=81lvaro Herrera=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Valdivi= a, Chile=C2=A0 =E2=80=94=C2=A0 https://www.EnterpriseDB.com/ ------=_Part_2913412_161807093.1625801566229 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable My apologies for making confusion with new thread. Yes its same issue relat= ed to earlier post.

I was trying to figure out  how= to ensure unique values for columns (billing_account_guid, ban). If i add partition key to constraint= , it wont be possible what im looking for.

My use case as below 

INSERT = INTO t1 SELECT * from t2 ON CONFLICT (billing_account_guid,ban) D= O UPDATE SET something=E2=80=A6

Or

INSERT INTO t1 SELECT * from t2&nb= sp;ON CONFLICT constraint (pk or uk)(billing_account_guid,ban) DO UPDATE SE= T something=E2=80=A6


Thanks

= Sent from Yahoo Mai= l for iPhone

On Thursday, July = 8, 2021, 7:12 PM, Mike Sofen <msofen@runbox.com> wrote:

I believe this thread qualifies for t= he funniest thread of 2021 (so far).  And yes, this is a top post.&nbs= p; :-)

Mike Sofen

-----Origin= al Message-----
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
Sent: Thursday= , July 08, 2021 3:29 PM
To: Justin Pryzby <pryzby@telsasoft.com>
Cc: Nagaraj Raj <= ;nagaraj.sf@yahoo.com>; pgsql-performance@postgresql.org
= Subject: Re: Partition column should be part of PK

On 2021-Jul-08, Justin Pryzby wrote:

> If I'm not wrong, this is the same thing you asked 2 week = ago.
>
> If so, why not continue= the conversation on the same thread, and why
> not r= eference the old thread ?
>
> I = went to the effort to find the old conversation.
> https://www.postgresql.org/message-id= /20210625042228.GJ29179@telsasoft
> .com

Actually, it looks like you're replying to the= same email you replied to two weeks ago.

--
=C3=81lvaro Herrera        &n= bsp;     Valdivia, Chile  =E2=80=94  https://www.Enterp= riseDB.com/




------=_Part_2913412_161807093.1625801566229--