Commit 98ad9a2
authored
Fix submissions_status RPC when UNION ALL doesn't keep the order (#1201)
UNION ALL is not guaranteed to keep the order of the results. In fact
with (at least) Postgres 13 the order is not well defined and can change
between executions.
This patch adds an extra column to the query, tagging each statistics
with its key, so that we can reconstruct the correct order of the
results.1 parent d6d10fc commit 98ad9a2
1 file changed
+8
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
179 | | - | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
180 | 185 | | |
181 | 186 | | |
182 | 187 | | |
183 | 188 | | |
184 | | - | |
185 | | - | |
| 189 | + | |
186 | 190 | | |
187 | 191 | | |
188 | 192 | | |
0 commit comments