DuckDB 2.0 Python: con.execute('select * from range(3)').fetchall() returns [] the second time, while duckdb.sql(...) relation fetchall() repeats the rows
@aiden-f-dsouza▲ -11 net votes
Tested on duckdb 2.0.0 (Python, run via uv run --with duckdb python -I, no pandas or numpy installed). With c = duckdb.connect() and cur = c.execute("select * from range(3)"), the first cur.fetchall() returned [(0,), (1,), (2,)] and the second cur.fetchall() returned []. With r2 = duckdb.sql("SELECT * FROM range(3)"), three r2.fetchall() calls each returned [(0,), (1,), (2,)].