pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #16753: 'expected 2-element int8 array' error while getting data using query with subquery
2+ messages / 2 participants
[nested] [flat]
* BUG #16753: 'expected 2-element int8 array' error while getting data using query with subquery
@ 2020-11-30 18:17 PG Bug reporting form <noreply@postgresql.org>
0 siblings, 1 reply; 2+ messages in thread
From: PG Bug reporting form @ 2020-11-30 18:17 UTC (permalink / raw)
To: pgsql-bugs@lists.postgresql.org; +Cc: anjithapaul@gmail.com
The following bug has been logged on the website:
Bug reference: 16753
Logged by: Anjitha Paulose
Email address: anjithapaul@gmail.com
PostgreSQL version: 12.5
Operating system: Windows, Linux
Description:
I am using timescale db on top of postgres db.
I am having table with mac_address and uptime. Mac address will be given
with colon or without colon. I am having the following data
mac_address | timestamp | uptime
-------------------+-----------------------------+----------
AA:BB:45:TT:CC:34 | 2020-11-30 00:00:04 | 0
112233445566 | 2020-11-30 00:00:06 | 0
NN:CC:33:33:22:22 | 2020-11-30 00:00:05 | 0
AA:BB:45:TT:CC:34 | 2020-11-30 00:30:04 | 1
112233445566 | 2020-11-30 00:30:06 | 1
NN:CC:33:33:22:22 | 2020-11-30 00:30:05 | 1
I have created an hourly continous agggregate view to get average uptime in
each hour using below query
CREATE VIEW aggregated_data
WITH (timescaledb.continuous) AS
SELECT
time_bucket(INTERVAL '1 hour', timestamp) AS time_bucket,
mac_address,
AVG(uptime) AS avg_uptime
FROM data_table
GROUP BY time_bucket, mac_address
When I am trying to get data from aggregated_data table using below query, I
am getting error 'expected 2-element int8 array'
SELECT mac_address, time_bucket,
avg_uptime, count(*) over() as count
FROM aggregated_data
WHERE time_bucket >= '2020-10-28 18:00:00' and time_bucket < '2020-11-30
08:31:52'
AND mac_address IN (
SELECT mac_address
FROM aggregated_data
WHERE time_bucket >= '2020-11-28 18:00:00' and time_bucket <
'2020-11-30 08:31:52'
GROUP BY mac_address
HAVING AVG(avg_uptime) > 0 AND AVG(avg_uptime) <=10
)
ORDER BY time_bucket LIMIT 10 OFFSET 0
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: BUG #16753: 'expected 2-element int8 array' error while getting data using query with subquery
@ 2020-11-30 20:29 Tom Lane <tgl@sss.pgh.pa.us>
parent: PG Bug reporting form <noreply@postgresql.org>
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lane @ 2020-11-30 20:29 UTC (permalink / raw)
To: anjithapaul@gmail.com; +Cc: pgsql-bugs@lists.postgresql.org
PG Bug reporting form <noreply@postgresql.org> writes:
> I am using timescale db on top of postgres db.
> ...
> When I am trying to get data from aggregated_data table using below query, I
> am getting error 'expected 2-element int8 array'
I'm guessing you need to complain to the timescale folks;
I don't think there's any such error message in core Postgres.
regards, tom lane
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2020-11-30 20:29 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-11-30 18:17 BUG #16753: 'expected 2-element int8 array' error while getting data using query with subquery PG Bug reporting form <noreply@postgresql.org>
2020-11-30 20:29 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox