From fe22839a95f9e776565dcd948bc14d151b5931db Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Tue, 28 Jul 2026 16:16:49 +0000 Subject: [PATCH] docs: state accurately what the row filter probe rejects --- backend/windmill-trigger-postgres/src/lib.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/backend/windmill-trigger-postgres/src/lib.rs b/backend/windmill-trigger-postgres/src/lib.rs index d305b97e3a..b98500b98e 100644 --- a/backend/windmill-trigger-postgres/src/lib.rs +++ b/backend/windmill-trigger-postgres/src/lib.rs @@ -466,12 +466,13 @@ pub async fn check_if_valid_publication_for_postgres_version( Ok(pg_14) } -/// Wraps `where_clause` exactly the way publication DDL does, then continues past the closing -/// parenthesis on a new line. +/// Wraps `where_clause` the way publication DDL does, then continues past the closing parenthesis +/// on a new line. /// -/// A filter can only parse here by being a self-contained expression: closing the wrapper early -/// strands the trailing `) IS NOT FALSE`, a line comment cannot reach across the newline to hide -/// it, and a block comment left open never terminates. +/// Whatever parses here cannot have run on into the grammar around the wrapper: a further table or +/// a `WITH (...)` strands the trailing `) IS NOT FALSE`, a line comment cannot reach across the +/// newline to hide it, and a block comment left open never terminates. A filter that only closes +/// and reopens the wrapper (`true) OR (false`) does parse here, and the DDL then rejects it. fn build_row_filter_probe(schema_name: &str, table_name: &str, where_clause: &str) -> String { format!( "SELECT 1 FROM {}.{} WHERE ({}\n) IS NOT FALSE",