From 5da3e3cc3e62efbf9894f4eb46a6e3958d15ab35 Mon Sep 17 00:00:00 2001 From: Darien Kindlund Date: Sun, 4 Feb 2024 12:27:18 -0500 Subject: [PATCH] Adding proper TLS/SSL support to poolOptions so that the similaritySearchVectorWithScore function actually connects to Postgres via TLS/SSL when specified in the additionalConfig. --- packages/components/nodes/vectorstores/Postgres/Postgres.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/components/nodes/vectorstores/Postgres/Postgres.ts b/packages/components/nodes/vectorstores/Postgres/Postgres.ts index 4e8bae32b..375728e81 100644 --- a/packages/components/nodes/vectorstores/Postgres/Postgres.ts +++ b/packages/components/nodes/vectorstores/Postgres/Postgres.ts @@ -253,7 +253,8 @@ const similaritySearchVectorWithScore = async ( port: postgresConnectionOptions.port, user: postgresConnectionOptions.username, password: postgresConnectionOptions.password, - database: postgresConnectionOptions.database + database: postgresConnectionOptions.database, + ssl: postgresConnectionOptions.extra?.ssl } const pool = new Pool(poolOptions) const conn = await pool.connect()