Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fGlZ6-0000yu-LG for pgsql-general@arkaria.postgresql.org; Thu, 10 May 2018 13:25:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fGlZ5-0006tu-5D for pgsql-general@arkaria.postgresql.org; Thu, 10 May 2018 13:24:59 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fGlZ3-0006tj-5E for pgsql-general@lists.postgresql.org; Thu, 10 May 2018 13:24:58 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fGlYz-0007p8-N0 for pgsql-general@postgresql.org; Thu, 10 May 2018 13:24:55 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id EAAF22257D; Thu, 10 May 2018 09:24:51 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Thu, 10 May 2018 09:24:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; bh=2S2mjiUp2ij5Guq79pTKvvzgw2Gq8 gL/hTTWClkAAfo=; b=nCXv2+p/DN1i8qdNAN808bwyaKEXjVJLR5Q9ErIscg27d w9kh6OD+5mlYncr26yAiYdmXohWbfX4gDQJaSIprXG5PLijZ5W3os+vu4nMQRO1c 4fxcMSJt9YSGuK7aDNDyMer6MjydiDK/cmSaG8N3kRE7ZEbtcNl+EC+J/fq5A0ua jnKPD6efHrYYyNRwQGSleGoKag1I0Lp8djlFwqLM9piqompDgFoYoRorOz/AaY3C kBP+APfrhy+UtEa3grT1cffBs362PH9tod/OQDBPY7OALDRk9CnolOqw+kIj3YvR 97rx85RsiIPC+Wq1gzayC4YWr7kp8SU1947ffwOkg== 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-sender:x-me-sender:x-sasl-enc; s=fm2; bh=2S2mji Up2ij5Guq79pTKvvzgw2Gq8gL/hTTWClkAAfo=; b=arGcFJtdwo+KZf6pYPyP4m UQoye7LNnyJcS6S5LwbMPb/nAxQhUgmA3HNvmX1FnNePYqEjJz1pfUHLFvB8LpPh 9bVRJbwuua59w13LDNrK66f2nx04/aqbjy7GdvMEkrX7S3z42Dzz2royDKRx6xLk 5Vgr0Qif0eX1yHxpNs2bGs4Ec2pAnGinOrEy65WP1KaFG2QwETXdWMU+shLrLqB8 Fg0O4GuZ4MVqjfG1XHQnQn3U8it+5JEdjMhGvPiD0P9D1AGguVo8Bh7MlxSH6b6q PgVSS2w5F6xOVfTnZBy3v/m9X9yHE1ZAytht936xbCXQStF+NdBiLdic0yS2pBrw == X-ME-Sender: Received: from [192.168.1.2] (unknown [71.212.135.74]) by mail.messagingengine.com (Postfix) with ESMTPA id 6521DE43E8; Thu, 10 May 2018 09:24:51 -0400 (EDT) Subject: Re: ON CONFLICT DO UPDATE To: tango ward References: <8c437506-072c-7829-b649-fd2a4a5ecc69@aklaver.com> Cc: pgsql-general From: Adrian Klaver Message-ID: Date: Thu, 10 May 2018 06:24:50 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 05/09/2018 09:50 PM, tango ward wrote: Ccing list. > > Hi, > > this is the my ON CONFLICT CODE > > ON CONFLICT (school_system_id, >                                       student_id, >                                       campus_name >                                       ) DO UPDATE >                               SET school_system_id = > excluded.school_system_id, >                                   student_id = excluded.student_id, >                                   campus_name = excluded.campus_name > > These are the fields that shows on error when I hadn't implemented the > ON CONFLICT. These are the duplicate fields. > -- Adrian Klaver adrian.klaver@aklaver.com