Re: BUG #8934: value != ANY (uuid[]) AND expr does not work in all cases
От | Alvaro Herrera |
---|---|
Тема | Re: BUG #8934: value != ANY (uuid[]) AND expr does not work in all cases |
Дата | |
Msg-id | 20140123171124.GR10723@eldon.alvh.no-ip.org обсуждение исходный текст |
Ответ на | BUG #8934: value != ANY (uuid[]) AND expr does not work in all cases (marcusoverheu@gmail.com) |
Ответы |
Re: BUG #8934: value != ANY (uuid[]) AND expr does not work in
all cases
|
Список | pgsql-bugs |
marcusoverheu@gmail.com escribió: > insert into uuidtest VALUES (1, 'ab15ea27-8768-4cbe-a1fb-02a2a949a34d'), > (1, '1c9e9ce5-d4d8-4a14-9eaf-929f27e09ba2'); > > then > select * from uuidtest where auuid = ANY > (ARRAY['1c9e9ce5-d4d8-4a14-9eaf-929f27e09ba2','ab15ea27-8768-4cbe-a1fb-02a2a949a34d']::uuid[]) > and aint = 1; > return 2 result > which would mean that if using not in > > select * from uuidtest where auuid != ANY > (ARRAY['1c9e9ce5-d4d8-4a14-9eaf-929f27e09ba2','ab15ea27-8768-4cbe-a1fb-02a2a949a34d']::uuid[]) > and aint = 1; Presumably you want auuid != ALL (array[ .. ]) here. In the first case, each value is = to the value that it equals to, so both are returned. In the second case, each value is != to the other value, so both are returned too. -- Álvaro Herrera http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
В списке pgsql-bugs по дате отправления: