geodiff icon indicating copy to clipboard operation
geodiff copied to clipboard

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

Open alexbruy opened this issue 3 years ago • 2 comments

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"...

alexbruy avatar Jun 30 '22 11:06 alexbruy

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...

wonder-sk avatar Aug 16 '22 20:08 wonder-sk

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

PeterPetrik avatar Jan 05 '23 12:01 PeterPetrik