Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b0D1m-0006NH-UD for pgsql-bugs@arkaria.postgresql.org; Tue, 10 May 2016 19:09:07 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1b0D1m-0004Xy-Ff for pgsql-bugs@arkaria.postgresql.org; Tue, 10 May 2016 19:09:06 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1b0Cww-0003Sz-E6 for pgsql-bugs@postgresql.org; Tue, 10 May 2016 19:04:06 +0000 Received: from wrigleys.postgresql.org ([204.145.124.246]) by magus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b0Cwu-0000D1-6h for pgsql-bugs@postgresql.org; Tue, 10 May 2016 19:04:05 +0000 MIME-Version: 1.0 Subject: BUG #14132: ON CONFLICT not inferring unique index with bigints To: pgsql-bugs@postgresql.org From: fiercetuba@protonmail.com Date: Tue, 10 May 2016 19:03:50 +0000 Message-ID: <20160510190350.2608.48667@wrigleys.postgresql.org> X-Pg-Spam-Score: -1.2 (-) Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org The following bug has been logged on the website: Bug reference: 14132 Logged by: Reynold Smith Email address: fiercetuba@protonmail.com PostgreSQL version: 9.5.2 Operating system: Linux Description: This fails, but change bigint to int and it works fine. ``` CREATE TABLE testtable( a serial PRIMARY KEY, b bigint, c bigint ); CREATE UNIQUE INDEX super_unique_idx ON testtable( COALESCE(b, 0), COALESCE(c, 0)); INSERT INTO testtable(b, c) VALUES (1, 2) ON CONFLICT ((COALESCE(b, 0)), (COALESCE(c, 0))) DO NOTHING; ``` -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs