Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cDa20-0003QJ-C5 for pgsql-general@arkaria.postgresql.org; Sun, 04 Dec 2016 16:52:52 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cDa1z-0005Dh-Lc for pgsql-general@arkaria.postgresql.org; Sun, 04 Dec 2016 16:52:51 +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.84_2) (envelope-from ) id 1cDa1y-0005DV-TG for pgsql-general@postgresql.org; Sun, 04 Dec 2016 16:52:51 +0000 Received: from mail-pf0-x232.google.com ([2607:f8b0:400e:c00::232]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1cDa1w-0000Cl-6G for pgsql-general@postgresql.org; Sun, 04 Dec 2016 16:52:49 +0000 Received: by mail-pf0-x232.google.com with SMTP id d2so59185520pfd.0 for ; Sun, 04 Dec 2016 08:52:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=POThLK37WG7HLjLCsoWDt8G8vY/ZIIFQ+Vy/V0g54pE=; b=XB+gdxci2v+scn+m4awPFpFoTbvP/Bp5Yt0E0Pd1b1VnAoQqa9C5mVewSVJeLS2ajf U80oBuITs94LWMr2YUuZLOf7NVO4m1/hlCEuskb3U6OIVd4Az72ZkDJVQO973MV+wB30 pbc1RxAIfAVG9mTtRijsyxW97OPwdJycZBmyElvY2RgQ/UOX6EnyP2ag7S+bWNWutGyw tH/E17tAjQDRWBzBX7Z+EG0Vp9kKgZ2fcHj0Wc/edKx8mbIv57S81TLno7YDyekCReNJ zj9d89sw40WAQzDPdQA2pX+qXaujgOP5VAqCA2epIlT8sq9aTb1UMCibNh6/2znPYsMB uJyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=POThLK37WG7HLjLCsoWDt8G8vY/ZIIFQ+Vy/V0g54pE=; b=Jmgav54wntaY+XtgSwWjBadMElHeQtLCZRg7XLsmQiN1XWW4FVrqyd6/rgXq140ORD GTRju1mkDmgVTkjxlEDdbOga27lCTedg2TJDKOiGmMfhnc80Oogu2XlR5RXloiV8OQ1v K3VkLdhsScirOlRwcXCAQjVHL+CYZGeJ62KXi4Sx2MGlZa2esdiFW0li295j5+wDMgAW qXigihO1HkymYoXgNNcDnylCb3PFb4fJDlnaKuGOv8MMnaGXij2fJJ5Z/1Ko2z9xPaLJ BErWbbPm+uLLZD+LdrlSQKioAZ8Rr2vohwnuK35sBTiDTmUJRmO+lXL1y6rl8Y5xgKYT yhUw== X-Gm-Message-State: AKaTC01JssKsr18ubJu3edHepV8Fg/rqynEXG36R27j4Sgl++SovDjBLa6wEs3gZgre3AQ== X-Received: by 10.84.218.6 with SMTP id q6mr116828826pli.139.1480870366917; Sun, 04 Dec 2016 08:52:46 -0800 (PST) Received: from ?IPv6:2601:681:4600:7028:a92a:37b2:7ac4:7fb5? ([2601:681:4600:7028:a92a:37b2:7ac4:7fb5]) by smtp.gmail.com with ESMTPSA id j68sm21247058pfk.95.2016.12.04.08.52.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 04 Dec 2016 08:52:46 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (1.0) Subject: Re: INSERT ON CONFLICT of "wide" table: target lists can have at most 1664 entries From: Gmail X-Mailer: iPad Mail (14B100) In-Reply-To: <20161204163237.GA8030@telsasoft.com> Date: Sun, 4 Dec 2016 09:52:45 -0700 Cc: pgsql-general@postgresql.org Content-Transfer-Encoding: quoted-printable Message-Id: <00F6777D-4500-4FEF-9BCE-0D1A22C1A2AB@gmail.com> References: <20161204163237.GA8030@telsasoft.com> To: Justin Pryzby X-Pg-Spam-Score: -2.7 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-general Precedence: bulk Sender: pgsql-general-owner@postgresql.org > On Dec 4, 2016, at 9:32 AM, Justin Pryzby wrote: >=20 > Our application INSERTs data from external sources, and infrequently UPDA= TEs > the previously-inserted data (currently, it first SELECTs to determine wh= ether > to UPDATE). >=20 > I'm implementing unique indices to allow "upsert" (and pg_repack and..), = but > running into a problem when the table has >830 columns (we have some tabl= es > which are at the 1600 column limit, and have previously worked around that > limit using arrays or multiple tables). >=20 > I tried to work around the upsert problem by using pygresql inline=3DTrue > (instead of default PREPAREd statements) but both have the same issue. >=20 > I created a test script which demonstrates the problem (attached). >=20 > It seems to me that there's currently no way to "upsert" such a wide tabl= e? Pardon my intrusion here, but I'm really curious what sort of datum has so = many attributes? --=20 Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general