Commit 040b53a7 authored by Dan Notestein's avatar Dan Notestein
Browse files

Fix CTE scope bug: use temp table for cursor iteration

CTEs are only accessible within their WITH statement, but the FOR loop
was outside that scope. This caused 'relation votes_to_process does not exist'.

Solution: Use a data-modifying CTE to INSERT votes into a pre-created temp
table, then iterate over the temp table in the FOR loop.
parent 59696070
Loading
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment