Skip to content

Use excluded(column) in filter_target #3593

Answered by weiznich
deved99 asked this question in Q&A
Discussion options

You must be logged in to vote

There are multiple points to address in this question:

  • The invalid generated SQL is another case of #799. That's a bug in diesel and that should not happen. Mind adding that reproduction to the linked issue?
  • The query you construct is not doing what you would expect. It applies the filter to the ON CONFLICT target, but you want to apply the filter to the update part. That's #3330, which is currently only implemented on diesels master branch.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@deved99
Comment options

@weiznich
Comment options

@deved99
Comment options

Answer selected by deved99
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants