Creating a partitioned table like this:
CREATE TABLE IF NOT EXISTS "doc"."events_2" ( "timestamp" TIMESTAMP WITH TIME ZONE, "week" TIMESTAMP WITH TIME ZONE GENERATED ALWAYS AS date_trunc('week', "timestamp"), "some_uid" BIGINT INDEX OFF, PRIMARY KEY ("week", "* some_uid *") )
If more than one interval is selected, it returns 0, although each of the intervals contains some value.
select count(*) as count from events_2 where ((timestamp >= '2020-06-25T22:00:00.000Z' and timestamp < '2020-06-26T07:07:00.000Z') OR (timestamp >= '2020-06-08T22:00:00.000Z' and timestamp < '2020-06-12T07:07:00.000Z')) limit 100;
In the documentation, we have this “limitation:”
WHERE clauses cannot contain queries like
partitioned_by_column='x' OR normal_column=x
But there is nothing about selecting more than one interval.