From: fiercetuba@protonmail.com
To: pgsql-bugs@postgresql.org
Subject: BUG #14132: ON CONFLICT not inferring unique index with bigints
Date: Tue, 10 May 2016 19:03:50 +0000
Message-ID: <20160510190350.2608.48667@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: fiercetuba@protonmail.com
Subject: Re: BUG #14132: ON CONFLICT not inferring unique index with bigints
In-Reply-To: <20160510190350.2608.48667@wrigleys.postgresql.org>
References: <20160510190350.2608.48667@wrigleys.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox