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

Update FROM problem #170

Merged
merged 2 commits into from
Dec 27, 2020
Merged

Update FROM problem #170

merged 2 commits into from
Dec 27, 2020

Conversation

emin100
Copy link
Contributor

@emin100 emin100 commented Apr 29, 2020

Missing FROM in update part

expected:
WITH archived AS (
DELETE
FROM "employees"
WHERE "manager_name" = 'Mary'
RETURNING "user_id"
)
UPDATE "users" SET archived = true FROM "archived" WHERE "archived"."user_id" = "id" RETURNING "id"

got:
WITH archived AS (
DELETE
FROM "employees"
WHERE "manager_name" = 'Mary'
RETURNING "user_id"
)
UPDATE "users" SET archived = true WHERE "archived"."user_id" = "id" RETURNING "id"

Mehmet Emin KARAKAŞ and others added 2 commits April 29, 2020 19:11
Missing `FROM` in update part

expected:
WITH archived AS (
            DELETE
            FROM "employees"
            WHERE "manager_name" = \'Mary\'
            RETURNING "user_id"
          )
          UPDATE "users" SET archived = true FROM "archived" WHERE "archived"."user_id" = "id" RETURNING "id"

 got:
 WITH archived AS (
             DELETE
             FROM "employees"
             WHERE "manager_name" = \'Mary\'
             RETURNING "user_id"
           )
           UPDATE "users" SET archived = true  WHERE "archived"."user_id" = "id" RETURNING "id"
@lfittl lfittl merged commit 78b177e into pganalyze:master Dec 27, 2020
@emin100 emin100 deleted the update_from branch December 28, 2020 06:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants