Shachar Shemesh <psql@shemesh.biz> writes:
> In other words, it seems that I, as a client, needs to guess whether
> postgres was compiled with or without "HAVE_INT64_TIMESTAMP".
No, you need to inquire of the value of the "integer_datetimes"
parameter. (At least as of 8.0, this is provided "for free" during
connection startup, so you don't even need an extra network round
trip to find it out.)
> Reading from the actual code, it seems each instance of postgres just
> assumes that it was encoded in the same format as it was compiled with,
No, it checks. See pg_control.
regards, tom lane