Skip to content
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

Behaviour when no results can be returned from a statement #78

Closed
tlocke opened this issue Jul 30, 2021 · 1 comment
Closed

Behaviour when no results can be returned from a statement #78

tlocke opened this issue Jul 30, 2021 · 1 comment

Comments

@tlocke
Copy link
Owner

tlocke commented Jul 30, 2021

The DBAPI 2 spec says that the fetchall() method should raise an exception if it is called when there is a null result (note that this is difference from a result with no rows). pg8000.dbapi should probably be changed to conform with that.

We should also probably change pg8000.native's run() to return None for a null result.

@tlocke
Copy link
Owner Author

tlocke commented Sep 4, 2021

So now pg8000.native's run() does return None for a null result. Also, for pg8000.dbapi's fetch*() methods already raise an exception for a null result.

@tlocke tlocke closed this as completed Sep 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant