Update postgres_impl.py
There is aBUG. When lighttrag uses the postgres@15 version, there will be an error.The BUG detail as follow: PostgreSQL database, error:subquery in FROM must have an alias HINT: For example, FROM (SELECT ...) [AS] foo. It roughly means that there is an error in SQL template, and you need to use the alias alias to declare the content of the subquery.
This commit is contained in:
@@ -1739,7 +1739,7 @@ SQL_TEMPLATES = {
|
||||
FROM LIGHTRAG_VDB_ENTITY
|
||||
where workspace=$1
|
||||
AND chunk_id IN (SELECT chunk_id FROM relevant_chunks)
|
||||
)
|
||||
) as chunk_distances
|
||||
WHERE distance>$2
|
||||
ORDER BY distance DESC
|
||||
LIMIT $3
|
||||
@@ -1756,7 +1756,7 @@ SQL_TEMPLATES = {
|
||||
FROM LIGHTRAG_DOC_CHUNKS
|
||||
where workspace=$1
|
||||
AND id IN (SELECT chunk_id FROM relevant_chunks)
|
||||
)
|
||||
) as chunk_distances
|
||||
WHERE distance>$2
|
||||
ORDER BY distance DESC
|
||||
LIMIT $3
|
||||
|
Reference in New Issue
Block a user