Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

.cursor() loses schema information

Offen
#162 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
45/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
python
Bereich
databases

Rechercherichtung

Beginnen Sie damit, die gemeldete Python-Reproduktion mit dem DuckDB Python package auszuführen und die Implementierung sowie die Tests für connection.cursor() zu untersuchen. Verfolgen Sie, wie das aktive Schema beim Erstellen des Cursors behandelt wird; die Aufgabe ist erledigt, wenn con.cursor().execute("SELECT current_schema()").fetchone() weiterhin other_schema statt main meldet.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

needs triage
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
Vorherrschende Sprache
Python
Sterne
189
Forks
117
Ø Merge
1 T. 1 Std.
Gemergte PRs (30 T.)
16

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus duckdb/duckdb-python

Alle Issues in duckdb/duckdb-python

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.