10000 Python API named parameters not always working · Issue #7602 · duckdb/duckdb · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Python API named parameters not always working #7602

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

Closed
2 tasks done
zx80 opened this issue May 20, 2023 · 2 comments · Fixed by #7604
Closed
2 tasks done

Python API named parameters not always working #7602

zx80 opened this issue May 20, 2023 · 2 comments · Fixed by #7604
Assignees

Comments

@zx80
Copy link
zx80 commented May 20, 2023

What happens?

It seems that SQL keywords are not accepted as named parameters.

To Reproduce

import duckdb
conn = duckdb.connect(":memory:")
conn.execute("SELECT $val", {"val": 42}).fetchone()
# (42,)
conn.execute("SELECT $value", {"value": 42}).fetchone()
# ParserException: Parser Error: syntax error at or near "value"

OS:

Linux

DuckDB Version:

0.8.1-dev23

DuckDB Client:

Python

Full Name:

Fabien Coelho

Affiliation:

Mines Paris

Have you tried this on the latest master branch?

  • I agree

Have you tried the steps to reproduce? Do they include all relevant data and configuration? Does the issue you report still appear there?

  • I agree
@zx80
Copy link
Author
zx80 commented May 20, 2023

And others, e.g. content which is not an SQL keyword AFAICR.
Failing include: left, select, table, join

@Mytherin Mytherin self-assigned this May 20, 2023
Mytherin added a commit to Mytherin/duckdb that referenced this issue May 20, 2023
@Mytherin
Copy link
Collaborator

Thanks for the report! I have pushed a fix in #7604

Mytherin added a commit that referenced this issue May 20, 2023
Fix #7602 - allow reserved keywords in named parameters
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.

2 participants
0