projects
/
postgresql.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f62be40
)
Fix timestamp range subdiff functions, when using float datetimes.
author
Heikki Linnakangas
Mon, 7 Nov 2011 15:33:31 +0000
(17:33 +0200)
committer
Heikki Linnakangas
Mon, 7 Nov 2011 15:38:43 +0000
(17:38 +0200)
src/backend/utils/adt/rangetypes.c
patch
|
blob
|
blame
|
history
diff --git
a/src/backend/utils/adt/rangetypes.c
b/src/backend/utils/adt/rangetypes.c
index 6327d33f3ae0001f5cc878bdf82fea6422d24f10..1ca6627b722a6eca1faae401ac45493ce6640280 100644
(file)
--- a/
src/backend/utils/adt/rangetypes.c
+++ b/
src/backend/utils/adt/rangetypes.c
@@
-1313,7
+1313,7
@@
tsrange_subdiff(PG_FUNCTION_ARGS)
#ifdef HAVE_INT64_TIMESTAMP
result = ((float8)(v1-v2)) / USECS_PER_SEC;
#else
- result =
timestamp
;
+ result =
v1 - v2
;
#endif
PG_RETURN_FLOAT8(result);
@@
-1329,7
+1329,7
@@
tstzrange_subdiff(PG_FUNCTION_ARGS)
#ifdef HAVE_INT64_TIMESTAMP
result = ((float8)(v1-v2)) / USECS_PER_SEC;
#else
- result =
timestamp
;
+ result =
v1 - v2
;
#endif
PG_RETURN_FLOAT8(result);