Re: More work on SortSupport for text - strcoll() and strxfrm() caching

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: More work on SortSupport for text - strcoll() and strxfrm() caching
Дата
Msg-id CA+Tgmob7sofAa8vh6ehd23bR=RxzVMzpZ42DgiSnk6BJvQ4Xmg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: More work on SortSupport for text - strcoll() and strxfrm() caching  (Peter Geoghegan <pg@heroku.com>)
Ответы Re: More work on SortSupport for text - strcoll() and strxfrm() caching  (Peter Geoghegan <pg@heroku.com>)
Список pgsql-hackers
On Wed, Oct 7, 2015 at 8:09 PM, Peter Geoghegan <pg@heroku.com> wrote:
> On Tue, Oct 6, 2015 at 1:16 PM, Robert Haas <robertmhaas@gmail.com> wrote:
>> If you would care to revise the patch accordingly, I will commit it
>> (barring objections from others, of course).
>
> Here is a revision of 0001-*, with both BSWAP32() and BSWAP64() in a
> new header, src/port/pg_bswap.h.
>
> No revisions were required to any other patch in the patch series to
> make this work, and so I only include a revised 0001-*.

Great.  I've committed that, minus the sortsupport.h changes which I
think should be part of 0002, and which in any case I'd like to
discuss a bit more.  It seems to me that (1) ABBREV_STRING_UINT isn't
a great name for this and (2) the comment is awfully long for the
thing to which it refers.  I suggest that we instead call it
DatumToBigEndian(), put it pg_bswap.h, and change the comments to
something like this:

/** Rearrange the bytes of a Datum into big-endian order.** One possible application of this macro is to make
comparisons
cheaper.  An integer* comparison of the new Datums will return the same result as a memcmp() on the* original Datums,
butthe integer comparison should be much cheaper.*/
 

The specific way that this is used by various sortsupport routines can
be adequately explained in the comments for those routines.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

Предыдущее
От: Nathan Wagner
Дата:
Сообщение: Re: bugs and bug tracking
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Multi-tenancy with RLS