Michael Fuhr <mike@xxxxxxxx> writes: > ... the length needs to be in host byte order. Right. The only place where a libpq client would be dealing with network-byte-order data is within binary-format values for data fields (in SELECT results) or binary-format parameters (when transmitting to the database). Metadata like field lengths is just in the local native representation. regards, tom lane