BUG #13675: Problem statement “INSERT ON CONFLICT WHERE"

Поиск
Список
Период
Сортировка
От nmgjinan@126.com
Тема BUG #13675: Problem statement “INSERT ON CONFLICT WHERE"
Дата
Msg-id 20151013014209.2784.48073@wrigleys.postgresql.org
обсуждение исходный текст
Ответы Re: BUG #13675: Problem statement “INSERT ON CONFLICT WHERE"  (Andres Freund <andres@anarazel.de>)
Список pgsql-bugs
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?




В списке pgsql-bugs по дате отправления:

Предыдущее
От: John Pruitt
Дата:
Сообщение: Re: BUG #13670: DST discrepancy between age() and subtraction for timestamptz arguments
Следующее
От: Andres Freund
Дата:
Сообщение: Re: BUG #13675: Problem statement “INSERT ON CONFLICT WHERE"