-
-
Notifications
You must be signed in to change notification settings - Fork 30.8k
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
stdlib sqlite3 executemany() does not support RETURNING statement #100021
Comments
Hi, just to give a quick update on that issue on a more recent version of Python/SQLite module: when executing @zentarim's example script with Python3.11 on Debian bookworm, no exception is raised, but no values are returned either :
The relevant versions are
Thank you for your work! |
TL;DR: I'd prefer to be conservative regarding this, and not alter the current semantics of
It's an unimplemented feature. |
Thank you for the explanation! |
FTR, I see there's room for improvement in the docs, so I reverted the PR title change I did yesterday and I've made this a docs issue. See gh-103939. I'll create a topic on Discourse about the feature request. |
I deliberately don't talk about internals for I know less than nothing about them. I just want to point out that from the user point of view there are barely any breaking changes expected. If somebody uses an Anyway, thanks for the explanation! |
You are probably correct, but people rely on any kind of behaviour in unexpected ways. If we change the semantics of
Anytime! Thanks for the report :) |
Oh, please take a look at the PR, if you find the time. |
…s resulting rows (python#103939)
@PascalinDe, @zentarim: I created a topic on Discourse regarding the feature request, in case you want to participate in the discussion over there. |
Thank you, I'm not familiar enough with the internals to actually participate, but I'll be sure to follow the discussion! |
Problem
sqlite3.Connection.executemany()
does not support aRETURNING
statement. All requests containing it fail with an exception:sqlite3.ProgrammingError: executemany() can only execute DML statements.
Working shell example
Produces a relevant output:
However, a Python example doing similar thing:
generates an exception:
Environment
Ubuntu 22.04.1 LTS
Kernel 6.0.0-1006-oem
Python 3.10.6
sqlite3 module version: 2.6.0
sqlite3 package version: 3.37.2
Not sure if it is a bug or unimplemented feature.
Thanks in advance!
Linked PRs
The text was updated successfully, but these errors were encountered: