agentscope-java icon indicating copy to clipboard operation
agentscope-java copied to clipboard

[Bug]: postgresql在调用update的时候报错

Open TianyuGeek001 opened this issue 4 months ago • 1 comments

AgentScope-Java is an open-source project. To involve a broader community, we recommend asking your questions in English.

Describe the bug A clear and concise description of what the bug is. private static final String UPSERT_SQL = """ INSERT INTO %s (namespace_path, item_key, value_json, version, updated_at) VALUES (?, ?, ?, 1, ?) ON CONFLICT (namespace_path, item_key) DO UPDATE SET value_json = EXCLUDED.value_json, version = %1$s.version + 1,, updated_at = EXCLUDED.updated_at """; 这个里面version后面多了一个 "," 号,导致执行的时候出错

To Reproduce Steps to reproduce the behavior:

  1. You code
  2. How to execute
  3. See error

Expected behavior A clear and concise description of what you expected to happen.

Error messages Detailed error messages.

Environment (please complete the following information):

  • AgentScope-Java Version: [e.g. 1.0.12, check your pom.xml dependency version or run mvn dependency:tree | grep agentscope-parent:pom(only mac/linux)]
  • Java Version: [e.g. 17]
  • OS: [e.g. macos, windows]

Additional context Add any other context about the problem here.

TianyuGeek001 avatar Jul 13 '26 03:07 TianyuGeek001

🤖 AI Assessment: Bug Report

Classification: Bug (area/harness, postgresql)

Analysis: This is a valid bug. The extra comma in the UPSERT_SQL causes PostgreSQL syntax errors.

Related PR: #2167 (fix PostgreSQL upsert SQL syntax error) fixes this issue.

Next Steps: Review and merge #2167.


Automated assessment by github-manager

oss-maintainer avatar Jul 14 '26 06:07 oss-maintainer