.cursor() loses schema information
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
Research direction
Start by running the reported Python reproduction against the DuckDB Python package and inspect the implementation and tests for connection.cursor(). Trace how the active schema is handled when the cursor is created; done means con.cursor().execute("SELECT current_schema()").fetchone() still reports other_schema rather than main.
Written by the indexing model from the issue text.
Description
What happens?
Whenever .cursor is called the description says Create a duplicate of the current connection however it actually losses the relevant schema information and instead switches to main
To Reproduce
con = duckdb.connect()
con.execute("CREATE SCHEMA IF NOT EXISTS other_schema")
con.execute("USE other_schema")
print(con.cursor().execute("SELECT current_schema()").fetchone())
OS:
Linux x86_64
DuckDB Package Version:
1.4.0
Python Version:
3.11.9
Full Name:
Julian Meyers
Affiliation:
Independent
What is the latest build you tested with? If possible, we recommend testing with the latest nightly build.
I have not tested with any build
Did you include all relevant data sets for reproducing the issue?
Not applicable - the reproduction does not require a data set
Did you include all code required to reproduce the issue?
- Yes, I have
Did you include all relevant configuration to reproduce the issue?
- Yes, I have
- Dominant language
- Python
- Stars
- 189
- Forks
- 117
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 16
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from duckdb/duckdb-python
-
needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
duckdb/duckdb-python#633 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
duckdb/duckdb-python#627 · 1 comment ·
Maintainers usually reply within 1 day
-
needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
duckdb/duckdb-python#576 · 3 comments ·
Maintainers usually reply within 1 day
-
needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
duckdb/duckdb-python#534 ·
Maintainers usually reply within 1 day
-
needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
duckdb/duckdb-python#386 ·
Maintainers usually reply within 1 day
All issues in duckdb/duckdb-python
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
letsencrypt/cp-cps#353 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
PedestrianDynamics/pyFDS-Evac#394 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
DOI-USGS/pywatershed#421 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
python-pillow/Pillow#10087 · 1 comment ·
Maintainers usually reply within 1 day