Skip to content

Commit ffc703a

Browse files
committed
Fix timestamp range subdiff functions, when using float datetimes.
1 parent f62be40 commit ffc703a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/backend/utils/adt/rangetypes.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1313,7 +1313,7 @@ tsrange_subdiff(PG_FUNCTION_ARGS)
13131313
#ifdef HAVE_INT64_TIMESTAMP
13141314
result = ((float8)(v1-v2)) / USECS_PER_SEC;
13151315
#else
1316-
result = timestamp;
1316+
result = v1 - v2;
13171317
#endif
13181318

13191319
PG_RETURN_FLOAT8(result);
@@ -1329,7 +1329,7 @@ tstzrange_subdiff(PG_FUNCTION_ARGS)
13291329
#ifdef HAVE_INT64_TIMESTAMP
13301330
result = ((float8)(v1-v2)) / USECS_PER_SEC;
13311331
#else
1332-
result = timestamp;
1332+
result = v1 - v2;
13331333
#endif
13341334

13351335
PG_RETURN_FLOAT8(result);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy