Question: I am using Postgres. I am trying to execute two functions in PARALLEL, and then union their results - here is my code so far
I am using Postgres. I am trying to execute two functions in PARALLEL, and then union their results here is my code so far which throws the following error SQL Error P: ERROR: current transaction is aborted, commands ignored until end of transaction block begin;
WITH areaids AS
SELECT DISTINCT "areaID"::character varying
FROM campaignscope cs
WHERE BETWEEN cs"campaignStartDate" AND cs"catchupEndDate"
areaidcounts AS
SELECT COUNT AS totalcount
FROM areaids
selectedareaids AS
SELECT "areaID"::character varying,
ROWNUMBER OVER ORDER BY "areaID"::character varying AS rownum
FROM areaids
results as
SELECT inter. FROM
select from public.interactionsloopeducmoaicarraySELECT selectedareaids."areaID"::character varying
FROM selectedareaids
JOIN areaidcounts ON true
WHERE selectedareaids.rownum areaidcounts.totalcount
::::
order by areaidparentimei,childimei,parentpingtime as inter
results as
SELECT inter. FROM
select from public.interactionsloopeducmoaicarraySELECT selectedareaids."areaID"::character varying
FROM selectedareaids
JOIN areaidcounts ON true
WHERE selectedareaids.rownum areaidcounts.totalcount
::::
order by areaidparentimei,childimei,parentpingtime as inter
SELECT FROM result
UNION ALL
SELECT FROM result;
commit;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
