Skip to content

Handle failures in noticeReceiver/noticeProcessor #14

@daurnimator

Description

@daurnimator

The current noticeReceiver and noticeProcessor use lua functions that may fail and longjmp out.

One option is to lua_pcall out to a second function.

  • This could make it easier to add coroutine support (via lua_pcallk)

Alternatively, only use functions that can't fail.

  • use a unique pointer and lua_rawgetp instead of lua_pushstring+lua_rawget
    • This is new in lua 5.2+
  • preallocate the PGresult *
  • never call luaL_error
    • A PQnoticeReceiver is by definition called for warnings or below, so it's not supposed to fail

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