On Wed, Oct 7, 2015 at 8:09 PM, Peter Geoghegan <p...@heroku.com> wrote: > On Tue, Oct 6, 2015 at 1:16 PM, Robert Haas <robertmh...@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, 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 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers