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

Return NULL and log error instead of crashing PostgreSQL upon error? #53

Open
joelonsql opened this issue May 20, 2024 · 0 comments
Open

Comments

@joelonsql
Copy link

Thanks for great work and a nice demo on YouTube.

In the demo, you showed how passing an empty string when expecting one char, resulted in an error that crashed PostgreSQL, albeit with a nice user-friendly error message from Zig, which is of course much better than the segfault C would cause.

However, crashing a production PostgreSQL database just because there is a bug in a Zig extension database function, might not always be desirable.

If possible, it would be nice with a setting that allows logging the error and just returning NULL instead of crashing.

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