Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Zloca-0003oG-80 for pgsql-bugs@arkaria.postgresql.org; Tue, 13 Oct 2015 01:43:20 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZlocZ-0007O5-FO for pgsql-bugs@arkaria.postgresql.org; Tue, 13 Oct 2015 01:43:19 +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) (envelope-from ) id 1ZlocY-0007NS-GD for pgsql-bugs@postgresql.org; Tue, 13 Oct 2015 01:43:18 +0000 Received: from wrigleys.postgresql.org ([204.145.124.246]) by magus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1ZlocM-0007G6-C8 for pgsql-bugs@postgresql.org; Tue, 13 Oct 2015 01:43:16 +0000 MIME-Version: 1.0 Subject: =?utf-8?q?BUG_=2313675=3A_Problem_statement_=E2=80=9CINSERT_ON_CON?= =?utf-8?q?FLICT_WHERE=22?= To: pgsql-bugs@postgresql.org From: nmgjinan@126.com Date: Tue, 13 Oct 2015 01:42:09 +0000 Message-ID: <20151013014209.2784.48073@wrigleys.postgresql.org> X-Pg-Spam-Score: -1.9 (-) 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: 13675 Logged by: nmgjinan Email address: nmgjinan@126.com PostgreSQL version: 9.5beta1 Operating system: CentOS release 5.6 32bit Description: Hi,I'm testing pg9.5 beta1, encounter a problem, detailed description: postgres=# create table distributors(did int primary key,dname varchar,is_active boolean); CREATE TABLE postgres=# insert into distributors values(1,'hyl',false),(2,'aaa',true); INSERT 0 2 postgres=# select * from distributors ; did | dname | is_active -----+-------+----------- 1 | hyl | f 2 | aaa | t (2 rows) postgres=# insert into distributors values (2,'bbb') postgres-# on conflict (did) where is_active do update set dname=EXCLUDED.dname; INSERT 0 1 postgres=# select * from distributors ; did | dname | is_active -----+-------+----------- 1 | hyl | f 2 | bbb | t (2 rows) postgres=# insert into distributors values (1,'hgdb') postgres-# on conflict (did) where is_active do update set dname=EXCLUDED.dname; INSERT 0 1 postgres=# select * from distributors ; did | dname | is_active -----+-------+----------- 2 | bbb | t 1 | hgdb | f (2 rows) postgres=# Why, when the where condition is true or false, the fields are change? -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs