mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Get rid of a bunch of #ifdef HAVE_INT64_TIMESTAMP conditionals by inventing
a new typedef TimeOffset to represent an intermediate time value. It's either int64 or double as appropriate, and in most usages will be measured in microseconds or seconds the same as Timestamp. We don't call it Timestamp, though, since the value doesn't necessarily represent an absolute time instant. Warren Turkal
This commit is contained in:
@ -10,7 +10,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/utils/adt/nabstime.c,v 1.153 2008/02/17 02:09:28 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/utils/adt/nabstime.c,v 1.154 2008/03/21 01:31:42 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -831,12 +831,7 @@ interval_reltime(PG_FUNCTION_ARGS)
|
||||
int year,
|
||||
month,
|
||||
day;
|
||||
|
||||
#ifdef HAVE_INT64_TIMESTAMP
|
||||
int64 span;
|
||||
#else
|
||||
double span;
|
||||
#endif
|
||||
TimeOffset span;
|
||||
|
||||
year = interval->month / MONTHS_PER_YEAR;
|
||||
month = interval->month % MONTHS_PER_YEAR;
|
||||
|
Reference in New Issue
Block a user