MerginMaps / MerginMaps/geodiff

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

Open
#181 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
183
Forks
21
Avg merge
9d 11h
Merged PRs (30d)
2

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing changeset creation for a PostgreSQL table with no updated columns, then trace the query generation described in the issue. Confirm the generated UPDATE is valid and that the changeset completes without the reported syntax error.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgresql, sql
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.