Skip to content

fix: surface unhandled native result statuses on the query callback - #3765

Open
official-burak wants to merge 1 commit into
brianc:masterfrom
official-burak:fix/pg-native-unhandled-result-status
Open

fix: surface unhandled native result statuses on the query callback#3765
official-burak wants to merge 1 commit into
brianc:masterfrom
official-burak:fix/pg-native-unhandled-result-status

Conversation

@official-burak

@official-burak official-burak commented Sep 2, 2026

Copy link
Copy Markdown

Thanks for the careful write-up in #3758. COPY through the native client, and other unhandled libpq statuses, finished with no result object, so the query callback looked like success while res was undefined. The server error never reached that callback, which made the aborted transaction hard to explain.

This emits a Result for COPY statuses, matching the JS driver, and reports unrecognized statuses on the query itself. NativeQuery also treats a missing result as an error instead of success.

Fixes #3758

Unhandled libpq statuses never reached the query callback, so callers saw undefined instead of the server error.
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.

pg-native: unhandled libpq result status drops the result and the server's error

1 participant