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

Check for null Datum objects, even if isnull is false. #661

Merged
merged 1 commit into from
Aug 29, 2022
Merged

Check for null Datum objects, even if isnull is false. #661

merged 1 commit into from
Aug 29, 2022

Conversation

willmurnane
Copy link
Contributor

In at least some cases, PostgreSQL can provide a NullableDatum instance with a null pointer and its isnull value set to false. This commit checks for that misbehavior whenever we're preparing to dereference a pointer, so that downstream code just gets None instead of a segfault. See more discussion at #648.

@willmurnane
Copy link
Contributor Author

Closes #659, presumably.

Copy link
Member

@workingjubilee workingjubilee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, that's fewer callsites than I was expecting, for some reason. Thank you!

@workingjubilee workingjubilee merged commit 9ad17ef into pgcentralfoundation:develop Aug 29, 2022
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

Successfully merging this pull request may close these issues.

2 participants