mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-09-30 11:01:16 +02:00
Fix timestamp range subdiff functions, when using float datetimes.
This commit is contained in:
parent
f62be400c0
commit
ffc703a891
@ -1313,7 +1313,7 @@ tsrange_subdiff(PG_FUNCTION_ARGS)
|
|||||||
#ifdef HAVE_INT64_TIMESTAMP
|
#ifdef HAVE_INT64_TIMESTAMP
|
||||||
result = ((float8)(v1-v2)) / USECS_PER_SEC;
|
result = ((float8)(v1-v2)) / USECS_PER_SEC;
|
||||||
#else
|
#else
|
||||||
result = timestamp;
|
result = v1 - v2;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
PG_RETURN_FLOAT8(result);
|
PG_RETURN_FLOAT8(result);
|
||||||
@ -1329,7 +1329,7 @@ tstzrange_subdiff(PG_FUNCTION_ARGS)
|
|||||||
#ifdef HAVE_INT64_TIMESTAMP
|
#ifdef HAVE_INT64_TIMESTAMP
|
||||||
result = ((float8)(v1-v2)) / USECS_PER_SEC;
|
result = ((float8)(v1-v2)) / USECS_PER_SEC;
|
||||||
#else
|
#else
|
||||||
result = timestamp;
|
result = v1 - v2;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
PG_RETURN_FLOAT8(result);
|
PG_RETURN_FLOAT8(result);
|
||||||
|
Loading…
Reference in New Issue
Block a user