pgsql 8.4 "not" + "is contained by" operators return wrong result
От | László Lajos Jánszky |
---|---|
Тема | pgsql 8.4 "not" + "is contained by" operators return wrong result |
Дата | |
Msg-id | CA+=RcCoVbUhxMgRb_HauTs7rTLOKc2ud-L1UieL6GsCt4=e8HA@mail.gmail.com обсуждение исходный текст |
Ответы |
Re: pgsql 8.4 "not" + "is contained by" operators return wrong result
|
Список | pgsql-bugs |
<div dir="ltr"><p><b>Description:</b><br /><p>By pgsql 8.4 I have the following bug:<br /><p>If the haystack array is null(for example by empty result of array_agg) by is contained by, and you use it with negation, the the result is falseinstead of true.<span><span class=""></span></span><p><br /><b>Reproduce:</b><p><span><span>The following query returnsnothing, but it should return 1.<br /></span></span><p><span><i><span class="">SELECT</span><span> 1 </span><spanclass="">FROM</span><span> </span><span class="">NOT</span><span>(ARRAY[1] <@NULL</span></i><span><i>); </i></span></span><p><b>Workaround:</b><span><span class=""><br/></span></span><p><span><i><span class="">SELECT</span><span> 1 </span><span class="">FROM (haystack IS NULLOR</span><span> </span><span class="">NOT</span><span>(ARRAY[1] <@ </span></i></span><span><i><span><span><i><spanclass="">haystack</span></i></span></span></i><span><i>)); </i><br /></span></span></div>
В списке pgsql-bugs по дате отправления: