Re: _USE_32BIT_TIME_T Patch

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Dave Page <dpage@pgadmin.org>
Cc: Andrew Dunstan <andrew@dunslane.net>, Owais Khan <owais.khan@enterprisedb.com>, pgsql-hackers@postgresql.org, Hamid Quddus <hamid.quddus@enterprisedb.com>
Date: 2012-08-31T19:36:34Z
Lists: pgsql-hackers
Dave Page <dpage@pgadmin.org> writes:
> As a side note - I'm not sure why _USE_32BIT_TIME_T was removed in the
> first place; it was added specifically to avoid this sort of problem,
> though iirc at the time we were thinking of extensions like Slony and
> PostGIS being built with Mingw for use with the VC++ built server.

We removed it when we changed our internal time_t usage to 64 bits:
http://git.postgresql.org/gitweb/?p=postgresql.git&a=commitdiff&h=cd004067742ee16ee63e55abfb4acbd5f09fbaab
Possibly that was just a brain fade caused by failing to think about
the distinction between pg_time_t and system time_t.  However, the
code has been like that since 8.4, and nobody complained before.
I share Andrew's unease about whether this issue is fully understood.

			regards, tom lane


Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Replace time_t with pg_time_t (same values, but always int64) in on-disk

  2. Use _USE_32BIT_TIME_T when building with MSVC. Also, enforce that it's