projects
/
rapid-gossip-sync-server
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
91616b0
)
Fix query compat with Postgres 13
author
Matt Corallo
<git@bluematt.me>
Sun, 2 Jul 2023 16:13:26 +0000
(16:13 +0000)
committer
Matt Corallo
<git@bluematt.me>
Sun, 2 Jul 2023 19:12:59 +0000
(19:12 +0000)
...which requires DISTINCT ON to match the start of ORDER BY.
src/lookup.rs
patch
|
blob
|
history
diff --git
a/src/lookup.rs
b/src/lookup.rs
index e3d3ceb63915e83c1a7541d6dfd06923884f71a2..779b253d22e211bd5b06e2e48e5ed7c04fe8394a 100644
(file)
--- a/
src/lookup.rs
+++ b/
src/lookup.rs
@@
-122,7
+122,7
@@
pub(super) async fn fetch_channel_announcements(delta_set: &mut DeltaSet, networ
SELECT DISTINCT ON (short_channel_id, direction) short_channel_id, seen
FROM channel_updates
WHERE short_channel_id = any($1)
- ORDER BY s
een ASC, short_channel_id ASC, directio
n ASC
+ ORDER BY s
hort_channel_id ASC, direction ASC, see
n ASC
) AS directional_last_seens
ORDER BY short_channel_id ASC, seen DESC
", &[&channel_ids]).await.unwrap();