From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Peter Geoghegan <pg(at)heroku(dot)com> |
Cc: | Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: More work on SortSupport for text - strcoll() and strxfrm() caching |
Date: | 2015-10-08 17:13:36 |
Message-ID: | CA+Tgmob7sofAa8vh6ehd23bR=RxzVMzpZ42DgiSnk6BJvQ4Xmg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Oct 7, 2015 at 8:09 PM, Peter Geoghegan <pg(at)heroku(dot)com> wrote:
> On Tue, Oct 6, 2015 at 1:16 PM, Robert Haas <robertmhaas(at)gmail(dot)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, but the 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
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2015-10-08 17:16:28 | Re: Multi-tenancy with RLS |
Previous Message | Nathan Wagner | 2015-10-08 17:11:20 | Re: bugs and bug tracking |