From 2d1f8a26f32b82b7bbe08e3ad5dab7b4f2abd0aa Mon Sep 17 00:00:00 2001 From: jbiskur Date: Fri, 20 Mar 2026 10:51:39 +0000 Subject: [PATCH] fix: suppress PostgreSQL NOTICE messages from CREATE TABLE IF NOT EXISTS The postgres.js driver logs NOTICE-level messages when CREATE TABLE IF NOT EXISTS finds the table already exists. This adds onnotice noop handler to suppress them. Co-Authored-By: Claude Opus 4.6 (1M context) --- src/pathways/postgres/postgres-adapter.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/pathways/postgres/postgres-adapter.ts b/src/pathways/postgres/postgres-adapter.ts index 8429ca7..f01289b 100644 --- a/src/pathways/postgres/postgres-adapter.ts +++ b/src/pathways/postgres/postgres-adapter.ts @@ -198,6 +198,9 @@ export class PostgresJsAdapter implements PostgresAdapter { } } + // Suppress PostgreSQL NOTICE messages (e.g. from CREATE TABLE IF NOT EXISTS) + postgresOptions.onnotice = () => {} + this.sql = this.postgres(this.connectionString, postgresOptions) } catch (error) { console.error("Failed to connect to PostgreSQL:", error)