Adding proper TLS/SSL support to poolOptions so that the similaritySearchVectorWithScore function actually connects to Postgres via TLS/SSL when specified in the additionalConfig.

This commit is contained in:
Darien Kindlund 2024-02-04 12:27:18 -05:00
parent 6013743705
commit 5da3e3cc3e
1 changed files with 2 additions and 1 deletions

View File

@ -253,7 +253,8 @@ const similaritySearchVectorWithScore = async (
port: postgresConnectionOptions.port, port: postgresConnectionOptions.port,
user: postgresConnectionOptions.username, user: postgresConnectionOptions.username,
password: postgresConnectionOptions.password, password: postgresConnectionOptions.password,
database: postgresConnectionOptions.database database: postgresConnectionOptions.database,
ssl: postgresConnectionOptions.extra?.ssl
} }
const pool = new Pool(poolOptions) const pool = new Pool(poolOptions)
const conn = await pool.connect() const conn = await pool.connect()