Skip to content

Conversation

@roseduan
Copy link
Contributor

@roseduan roseduan commented Feb 5, 2025

In PostgreSQL, there is no need to specify the unique key fields in the DO UPDATE SET clause.

See more details in https://www.postgresql.org/docs/current/sql-insert.html

@boring-cyborg
Copy link

boring-cyborg bot commented Feb 5, 2025

Thanks for opening this pull request! Please check out our contributing guidelines. (https://flink.apache.org/contributing/how-to-contribute.html)

@roseduan roseduan force-pushed the improve_postgres_upsert branch from e9f3681 to 3a9ac70 Compare February 6, 2025 09:59
@roseduan roseduan changed the title [hotfix][Connector/JDBC] Remove unnecessary update fields of PostgreSQL upsert statement [hotfix][Connector/JDBC] Remove unnecessary unique fields of PostgreSQL upsert statement Feb 6, 2025
…QL upsert statement

In PostgreSQL, there is no need to specify the unique key fields in the
DO UPDATE SET clause.

See more details in
https://www.postgresql.org/docs/current/sql-insert.html
@roseduan roseduan force-pushed the improve_postgres_upsert branch from 3a9ac70 to 3e2dfb2 Compare February 7, 2025 02:50
Copy link
Contributor

@leonardBang leonardBang left a comment

Choose a reason for hiding this comment

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

Thanks @roseduan for the update, LGTM

@leonardBang leonardBang merged commit 544275c into apache:main Feb 7, 2025
11 checks passed
@boring-cyborg
Copy link

boring-cyborg bot commented Feb 7, 2025

Awesome work, congrats on your first merged pull request!

zm999999 added a commit to zm999999/flink-connector-jdbc that referenced this pull request Jun 25, 2025
Optimize the Postgresql upsert query to avoid unnecessary execution effort
zm999999 added a commit to zm999999/flink-connector-jdbc that referenced this pull request Jun 25, 2025
Merge pull request apache#155 from apache/main
Optimize the Postgresql upsert query to avoid unnecessary execution effort
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants