Skip to content

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

@joelonsql

Description

@joelonsql

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions