Re: Optimizing nbtree ScalarArrayOp execution, allowing multi-column ordered scans, skip scan
| От | Tom Lane |
|---|---|
| Тема | Re: Optimizing nbtree ScalarArrayOp execution, allowing multi-column ordered scans, skip scan |
| Дата | |
| Msg-id | 3012166.1712541040@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: Optimizing nbtree ScalarArrayOp execution, allowing multi-column ordered scans, skip scan (Peter Geoghegan <pg@bowt.ie>) |
| Ответы |
Re: Optimizing nbtree ScalarArrayOp execution, allowing multi-column ordered scans, skip scan
|
| Список | pgsql-hackers |
Peter Geoghegan <pg@bowt.ie> writes:
> The assertions in question are arguably redundant. There are very
> similar assertions just a little earlier on, as we initially set up
> the array stuff (right before _bt_compare_scankey_args is called).
> I'll just remove the "Assert(xform[j].ikey == array->scan_key)"
> assertion that Coverity doesn't like, in addition to the
> "Assert(!array || array->scan_key == i)" assertion, on the grounds
> that they're redundant.
If you're doing that, then surely
if (j != (BTEqualStrategyNumber - 1) ||
!(xform[j].skey->sk_flags & SK_SEARCHARRAY))
{
...
}
else
{
Assert(j == (BTEqualStrategyNumber - 1));
Assert(xform[j].skey->sk_flags & SK_SEARCHARRAY);
Assert(xform[j].ikey == array->scan_key);
Assert(!(cur->sk_flags & SK_SEARCHARRAY));
}
those first two Asserts are redundant with the "if" as well.
regards, tom lane
В списке pgsql-hackers по дате отправления: