mirror of
https://github.com/postgres/postgres.git
synced 2025-11-09 06:21:09 +03:00
Consistently declare timestamp variables as TimestampTz.
Twiddle the replication-related code so that its timestamp variables
are declared TimestampTz, rather than the uninformative "int64" that
was previously used for meant-to-be-always-integer timestamps.
This resolves the int64-vs-TimestampTz declaration inconsistencies
introduced by commit 7c030783a, though in the opposite direction to
what was originally suggested.
This required including datatype/timestamp.h in a couple more places
than before. I decided it would be a good idea to slim down that
header by not having it pull in <float.h> etc, as those headers are
no longer at all relevant to its purpose. Unsurprisingly, a small number
of .c files turn out to have been depending on those inclusions, so add
them back in the .c files as needed.
Discussion: https://postgr.es/m/26788.1487455319@sss.pgh.pa.us
Discussion: https://postgr.es/m/27694.1487456324@sss.pgh.pa.us
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
#include "libpq-fe.h"
|
||||
|
||||
#include "access/xlogdefs.h"
|
||||
#include "datatype/timestamp.h"
|
||||
|
||||
extern const char *progname;
|
||||
extern char *connection_string;
|
||||
@@ -38,11 +39,11 @@ extern bool RunIdentifySystem(PGconn *conn, char **sysid,
|
||||
TimeLineID *starttli,
|
||||
XLogRecPtr *startpos,
|
||||
char **db_name);
|
||||
extern int64 feGetCurrentTimestamp(void);
|
||||
extern void feTimestampDifference(int64 start_time, int64 stop_time,
|
||||
extern TimestampTz feGetCurrentTimestamp(void);
|
||||
extern void feTimestampDifference(TimestampTz start_time, TimestampTz stop_time,
|
||||
long *secs, int *microsecs);
|
||||
|
||||
extern bool feTimestampDifferenceExceeds(int64 start_time, int64 stop_time,
|
||||
extern bool feTimestampDifferenceExceeds(TimestampTz start_time, TimestampTz stop_time,
|
||||
int msec);
|
||||
extern void fe_sendint64(int64 i, char *buf);
|
||||
extern int64 fe_recvint64(char *buf);
|
||||
|
||||
Reference in New Issue
Block a user