Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitffc703a

Browse files
committed
Fix timestamp range subdiff functions, when using float datetimes.
1 parentf62be40 commitffc703a

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
#ifdefHAVE_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
#ifdefHAVE_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)

[8]ページ先頭

©2009-2025 Movatter.jp