Skip to content
Discussion options

You must be logged in to vote

Hello!

Building a differential report requires two time intervals. Function tstzrange() gets two timestamps as an interval bounds, it can't be called with four arguments. You could use something like this:

select get_diffreport(
    tstzrange(now() - interval '4 hours',now() - interval '2 hours'),
    tstzrange(now() - interval '1 hours', now())
);

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by zubkov-andrei
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants