Skip to content

fix PostgreSQL upsert SQL syntax error (#2166)#2167

Open
ningmeng0503 wants to merge 1 commit into
agentscope-ai:mainfrom
ningmeng0503:fix/2166-postgresql-upsert
Open

fix PostgreSQL upsert SQL syntax error (#2166)#2167
ningmeng0503 wants to merge 1 commit into
agentscope-ai:mainfrom
ningmeng0503:fix/2166-postgresql-upsert

Conversation

@ningmeng0503

Copy link
Copy Markdown
Contributor

Fixes #2166.
Removed an extra comma in PostgresBaseStore.UPSERT_SQL that caused a PostgreSQL syntax error on the ON CONFLICT ... DO UPDATE branch.

@ningmeng0503 ningmeng0503 requested a review from a team July 13, 2026 05:09
@codecov

codecov Bot commented Jul 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@AgentScopeJavaBot AgentScopeJavaBot added bug Something isn't working area/extensions agentscope-extensions (general) labels Jul 13, 2026

@AgentScopeJavaBot AgentScopeJavaBot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 AI Review

This PR fixes a clear PostgreSQL syntax error in PostgresBaseStore.UPSERT_SQL where an extra comma (,,) appeared at the end of the version assignment inside the ON CONFLICT DO UPDATE SET clause. The double comma would cause every put() call to fail with a SQL parse error at runtime, making the upsert path completely non-functional. The fix is a minimal one-character removal that is correct and complete. No secondary issues or missing test coverage concerns rise to the level of a finding given the triviality and precision of the change.

@AgentScopeJavaBot AgentScopeJavaBot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 AI Review

This PR fixes a clear PostgreSQL syntax error in PostgresBaseStore.UPSERT_SQL where an extra comma (,,) appeared at the end of the version assignment inside the ON CONFLICT DO UPDATE SET clause. The double comma would cause every put() call to fail with a SQL parse error at runtime, making the upsert path completely non-functional. The fix is a minimal one-character removal that is correct and complete. No secondary issues or missing test coverage concerns rise to the level of a finding given the triviality and precision of the change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/extensions agentscope-extensions (general) bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

3 participants