Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect SQL query when there are no updates in the PostgreSQL table #181

Open
alexbruy opened this issue Jun 30, 2022 · 2 comments
Open
Labels
bug Something isn't working

Comments

@alexbruy
Copy link
Contributor

If there are no changes in the PostgreSQL table, geodiff generates wrong query to fetch updated columns:

UPDATE "schema"."table" SET  WHERE "id" = 2

As a result it fails to create changeset with the error

Error: apply changeset failed!
GEODIFF: Error: postgres cmd error: ERROR:  syntax error at or near "WHERE"
LINE 1: ... "schema"."table" SET  WHERE "id"...
@wonder-sk
Copy link
Contributor

Normally this should not happen, only with invalid diffs (where update entry has no actual changes recorded), so when this happens, the actual underlying issue is somewhere else...

@PeterPetrik
Copy link
Contributor

@alexbruy do we have some data to replicate the issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants