.cursor() loses schema information
- Langage dominant
- Python
- Étoiles
- 187
- Forks
- 112
- Merge moyen
- 13 h 29 min
- PR mergées (30 j)
- 17
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
```python3
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?
- [x] Yes, I have
### Did you include all relevant configuration to reproduce the issue?
- [x] Yes, I have
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par exécuter la reproduction Python signalée avec le DuckDB Python package et examinez l’implémentation ainsi que les tests de connection.cursor(). Suivez la manière dont le schéma actif est géré lors de la création du curseur ; le travail est terminé lorsque con.cursor().execute("SELECT current_schema()").fetchone() signale toujours other_schema plutôt que main.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- python
- Domaine
- databases
- Type d'issue
- Bug
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 45/100