Re: Toast bug in CVS HEAD
| От | Tom Lane |
|---|---|
| Тема | Re: Toast bug in CVS HEAD |
| Дата | |
| Msg-id | 2486.1225917710@sss.pgh.pa.us обсуждение |
| Ответ на | Toast bug in CVS HEAD (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>) |
| Ответы |
Re: Toast bug in CVS HEAD
|
| Список | pgsql-hackers |
Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> writes:
> Basically, this comment and code in genam.c:
> ...
> is wrong, because it assumes that there's only one scankey per index
> column, but that's not true for toast_fetch_datum_slice(), which uses
> two scankeys for the chunkid, to fetch a range. Attached is a patch to
> fix that, as suggested in the comment. Comments? I'll apply if not..
Huh, can't believe I missed that that caller might use non-sequential
column numbers.
It's kind of annoying to introduce a search when it's so seldom needed,
though. How about something like
/* fast path for common case */if (key[i].sk_attno == irel->rd_index->indkey.values[i]) key[i].sk_attno = i + 1;else
... search as you have it ...
regards, tom lane
В списке pgsql-hackers по дате отправления: