Skip to content

Commit 7bcc76d

Browse files
authored
fix(community): postgres indexes getTime returning NaN due to missing alias (#8720)
2 parents e9df82d + 8f9c617 commit 7bcc76d

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/hot-bugs-clap.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@langchain/community": patch
3+
---
4+
5+
postgres indexes getTime returning NaN due to missing alias

libs/langchain-community/src/indexes/postgres.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export class PostgresRecordManager implements RecordManagerInterface {
6969

7070
async getTime(): Promise<number> {
7171
const res = await this.pool.query(
72-
"SELECT EXTRACT(EPOCH FROM CURRENT_TIMESTAMP)"
72+
"SELECT EXTRACT(EPOCH FROM CURRENT_TIMESTAMP) AS extract"
7373
);
7474
return Number.parseFloat(res.rows[0].extract);
7575
}

0 commit comments

Comments
 (0)