keepConcentration opened a new pull request, #8125:
URL: https://github.com/apache/gravitino/pull/8125
<!--
1. Title: [#<issue>] <type>(<scope>): <subject>
Examples:
- "[#123] feat(operator): support xxx"
- "[#233] fix: check null before access result in xxx"
- "[MINOR] refactor: fix typo in variable name"
- "[MINOR] docs: fix typo in README"
- "[#255] test: fix flaky test NameOfTheTest"
Reference: https://www.conventionalcommits.org/en/v1.0.0/
2. If the PR is unfinished, please mark this PR as draft.
-->
### What changes were proposed in this pull request?
This PR fixes the incorrect SQL syntax in
`UserRoleRelPostgreSQLProvider.java` by replacing `VALUES()` function calls
with `EXCLUDED` references in the `ON CONFLICT ... DO UPDATE` clause. The
change ensures proper PostgreSQL compatibility for upsert operations.\
### Why are the changes needed?
The current implementation uses MySQL-specific `VALUES()` function syntax in
PostgreSQL provider, which is incorrect according to PostgreSQL documentation.
PostgreSQL's `INSERT ... ON CONFLICT ... DO UPDATE` requires using `EXCLUDED`
table alias to reference the values that would have been inserted, not the
`VALUES()` function.
Fix: #8109
### Does this PR introduce _any_ user-facing change?
No user-facing changes. This is a bug fix that ensures the existing
functionality works correctly on PostgreSQL databases.
### How was this patch tested?
Tested with existing tests.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]