diff pkg/imports/wx.go @ 5021:6fe3662aafeb

Add explaining comment Since the commented filter condition logically adds nothing to the WHERE clause here, explain why it's there.
author Tom Gottfried <tom@intevation.de>
date Mon, 16 Mar 2020 15:19:13 +0100
parents e4ab338e7ba9
children 6270951dda28
line wrap: on
line diff
--- a/pkg/imports/wx.go	Sat Mar 14 20:11:10 2020 +0100
+++ b/pkg/imports/wx.go	Mon Mar 16 15:19:13 2020 +0100
@@ -61,6 +61,9 @@
 ),
 t AS (
   UPDATE waterway.waterway_axis SET last_found = current_timestamp
+  -- The first condition is just to help the PostgreSQL query planner
+  -- to avoid evaluating more costly conditions including those
+  -- introduced by row level security policies:
   WHERE (SELECT new_ax FROM g) IS NOT NULL
     AND validity @> current_timestamp
     AND (