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

Bulk update bug on postgresql 10 #246

Closed
pietermartin opened this issue Nov 10, 2017 · 1 comment
Closed

Bulk update bug on postgresql 10 #246

pietermartin opened this issue Nov 10, 2017 · 1 comment
Assignees
Labels
Milestone

Comments

@pietermartin
Copy link
Owner

pietermartin commented Nov 10, 2017

The following query breaks on postgresql 10

UPDATE "public"."E_edgeToRoot" a 
SET
	("className") = 
	(v."className")
FROM (
VALUES
	(1, 'thisthatandanother')
) AS v(id, "className")
WHERE a."ID" = v.id

If there is only one property then the set statement must not have any parenthesis.

The following works.

UPDATE "public"."E_edgeToRoot" a 
SET
	"className" = 
	v."className"
FROM (
VALUES
	(1, 'thisthatandanother')
) AS v(id, "className")
WHERE a."ID" = v.id

Describe here http://www.postgresql-archive.org/Re-PostgreSQL-10-parenthesized-single-column-updates-can-produce-errors-td5989984.html

@pietermartin pietermartin added this to the 1.4.1 milestone Nov 10, 2017
@pietermartin pietermartin self-assigned this Nov 10, 2017
pietermartin added a commit that referenced this issue Nov 10, 2017
@pietermartin
Copy link
Owner Author

done with 42a5594

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant