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

Postgres: [pg on conflict method] does not support 'where' condition. #733

Closed
zidaye opened this issue Nov 29, 2022 · 1 comment
Closed

Comments

@zidaye
Copy link
Contributor

zidaye commented Nov 29, 2022

#[test]
fn test_pg_on_conflict() {
     let pg_dialect = PostgreSqlDialect {};
     let sql = r#" INSERT INTO distributors (did, dname, dsize)  VALUES (5, 'Gizmo Transglobal', 1000), (6, 'Associated Computing, Inc', 1010)  ON CONFLICT(did)  DO UPDATE SET dname = $1 WHERE dsize > $2"#;
     let mut ast = Parser::parse_sql(&pg_dialect, sql).unwrap();
}

The result after the test case is executed:

thread 'test_pg_on_conflicts' panicked at 'called `Result::unwrap()` on an `Err` value: ParserError("Expected end of statement, found: WHERE")',

version: main [branch]

@zidaye
Copy link
Contributor Author

zidaye commented Nov 29, 2022

pr #735

@zidaye zidaye closed this as completed Dec 1, 2022
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 a pull request may close this issue.

1 participant