Re: Unstable timestamp binary representation? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Unstable timestamp binary representation?
Date
Msg-id 6678.1111159247@sss.pgh.pa.us
Whole thread Raw
In response to Unstable timestamp binary representation?  (Shachar Shemesh <psql@shemesh.biz>)
Responses Re: Unstable timestamp binary representation?
List pgsql-hackers
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


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: read-only planner input
Next
From: Tom Lane
Date:
Subject: Re: QueryResults from Executor