diff --git a/libs/langchain-community/src/indexes/postgres.ts b/libs/langchain-community/src/indexes/postgres.ts index 2777aefabaee..5229882782e5 100644 --- a/libs/langchain-community/src/indexes/postgres.ts +++ b/libs/langchain-community/src/indexes/postgres.ts @@ -29,8 +29,8 @@ export class PostgresRecordManager implements RecordManagerInterface { this.pool = pool || new pg.Pool(postgresConnectionOptions); this.tableName = tableName || "upsertion_records"; this.finalTableName = config.schema - ? `"${config.schema}"."${tableName}"` - : `"${tableName}"`; + ? `"${config.schema}"."${this.tableName}"` + : `"${this.tableName}"`; } async createSchema(): Promise {