Re: Sort support for macaddr8
От | Peter Geoghegan |
---|---|
Тема | Re: Sort support for macaddr8 |
Дата | |
Msg-id | CAH2-WzktQH_kyiyk7bYWPA3a2DqfYTiTZabQ3H7_o87gJvrTDA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Sort support for macaddr8 (Chapman Flack <chap@anastigmatix.net>) |
Список | pgsql-hackers |
On Mon, Jun 3, 2019 at 2:59 PM Chapman Flack <chap@anastigmatix.net> wrote: > 1. (This one seems like a bug.) In the little-endian case, if > SIZEOF_DATUM is smaller than the type, I'm not convinced by doing > the DatumBigEndianToNative() after the memcpy(). Seems like that's > too late to make sure the most-significant bytes got copied. Uh, when else would you do it? Before the memcpy()? > 2. (This one seems like an API opportunity.) If it becomes common to > add abbreviation support for smallish types such that (as here, > when SIZEOF_DATUM >= 8), an abbreviated "equality" result is in fact > authoritative, would it be worthwhile to have some way for the sort > support routine to announce that fact to the caller? That could > spare the caller the effort of re-checking with the authoritative > routine. It's possible that that would make sense, but I don't think that this patch needs to do that. There is at least one pre-existing cases that does this -- macaddr. -- Peter Geoghegan
В списке pgsql-hackers по дате отправления: