Bruce Momjian <[EMAIL PROTECTED]> writes: > Gregory Stark wrote: >> If we want to allow storing >1 headers unaligned which I think would be >> good then I still think we have to read them using bytewise lookups -- ie >> by casting to (char*). That means network byte order or using the low order >> bits is equally efficient.
> I think the plan was to have the macro code conditional on big-little > endian. We can deal with doing >1 headers unaligned at some future > date if we feel we need it, and the macros will make it transparent. Forcing bytewise access does not sound like a good plan to me --- you're very much at the mercy of the compiler whether you get good code for that. Plus you can't do it without multiple evaluation of the macro argument, which is something I'd really prefer we not introduce into such a widely-used macro. The only argument in favor is to save a couple bytes of alignment padding, but since this is only going to happen for wide data values, the significance of that is minimal. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match