Content-Length: 270332 | pFad | http://github.com/postgrespro/postgres/commit/ffc703a891e336b9bf4b74112bd4684d1f990fab

DA Fix timestamp range subdiff functions, when using float datetimes. · postgrespro/postgres@ffc703a · GitHub
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)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/ffc703a891e336b9bf4b74112bd4684d1f990fab

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy