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 1mseYI-0001a4-Uc for pgsql-general@arkaria.postgresql.org; Thu, 02 Dec 2021 05:22:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mseYG-0002eq-Q4 for pgsql-general@arkaria.postgresql.org; Thu, 02 Dec 2021 05:22:36 +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 1mseYF-0002eE-L3 for pgsql-general@lists.postgresql.org; Thu, 02 Dec 2021 05:22:36 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mseYC-0007Yt-Ht for pgsql-general@lists.postgresql.org; Thu, 02 Dec 2021 05:22:35 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 084535C019E; Thu, 2 Dec 2021 00:22:31 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Thu, 02 Dec 2021 00:22:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= message-id:date:mime-version:subject:to:cc:references:from :in-reply-to:content-type:content-transfer-encoding; s=fm1; bh=t a0RwZ2KaH0Lbw2FUX7Yi/JV5+791KwuWFikwvfjjHs=; b=NfOJq1C2uKE3i4Yg7 zJrPcSZX9vo+Dzj6A3ItDB+hKzRDNX138TfugMjozegC+ODJRzgIMrgzhfMy+gsb DRkSVoWWl2mvY+xof4TWHLiHx5iNqfaEG6AawW8R3nvuLeuWoWsv3YAp4GfN3xno 8LhZx+FLje4RXLYRT9jqNkipAFdY8ImcvLitplUO1vfnIEu2mMzJtyEYNCLI5N0Q 8I4/ArfMzkEkIDXkaZ2Z5jYk7c69UNUtEu7UsDVuijcaJ3TbWBUX9kEdj57fbYEb xHiQ7pzRgNXmI519+lgq7AcZHr8B92zvbB5Hyx0pU+CPYyViek7/F2aAlaaxVgCT UvWOQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=ta0RwZ2KaH0Lbw2FUX7Yi/JV5+791KwuWFikwvfjj Hs=; b=OyNFvtm1mOMxy3vDoh5GIzWfoGdejopYdch37z8bvbIM0oy20Z4eSE7IP S3yrb4/a4KHbG8yY0+iM6slkedrCPLGEOnu1vZzGshePEyzBQ4BK5ySpJzBJTzAN wPMG2zu3trqpx+YgjGmhlN/X46N5lmTW2wy7URGBVuNTdKlaCXMjGfq5VUscDz9c a9aXTqbXVbniG80o+Z0x1b6/p5oMfUuPeKxJo2KQmgFjcQVbao79QfRg1o737cmD /RuKlVxzG6xgIpUc4FNHXWAIQNZoXmqjiammHfs9KShjqgiRP+v/X0hWa49al6DF WGSPCtZUSW8J4MMsVP8pU4S6JhLqw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrieeggdekgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfhfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeetughrihgr nhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomh eqnecuggftrfgrthhtvghrnhepvedvkeeihfduhffhtdekleegffduiefgteejgeffgffh teefleeludfgleelgeevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrg hilhhfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 2 Dec 2021 00:22:29 -0500 (EST) Message-ID: Date: Wed, 1 Dec 2021 21:22:29 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.2 Subject: Re: INSERT ... ON CONFLICT doesn't work Content-Language: en-US To: Michael Lewis Cc: Jenda Krynicky , pgsql-general@lists.postgresql.org References: <61A7CB18.20091.3401B246@Jenda.Krynicky.cz> <61A7D076.6178.3416A928@Jenda.Krynicky.cz> <26be475c-fc7f-92f1-42ac-acf8b1ed3716@aklaver.com> From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 12/1/21 20:20, Michael Lewis wrote: > Perhaps I missed something, but why all this effort to reference the > column and not just reference IX_Lockers_Uuid for the on conflict clause? Two reasons: 1) The OP thought that ON CONFLICT could only reference a column. 2) Explaining why the error occurred in the first place, which is down to variable/column name ambiguity. -- Adrian Klaver adrian.klaver@aklaver.com