Skip to content

Conversation

@uap-dev
Copy link
Contributor

@uap-dev uap-dev commented Feb 2, 2026

When a Submittable is passed to client.query()
with query_timeout configured but WITHOUT a callback, the client would crash. This is especially problematic because it forces accumulation on Queries which the caller might not want if using on('row') event handlers. See: https://github.com/brianc/node-postgres/blob/master/packages/pg/lib/query.js#L79

TypeError: queryCallback is not a function
    at Timeout._onTimeout (/Users/[nope]/Documents/code/node-postgres/packages/pg/lib/client.js:605:9)
    at listOnTimeout (node:internal/timers:581:17)
    at process.processTimers (node:internal/timers:519:7)

Copy link
Owner

@brianc brianc left a comment

Choose a reason for hiding this comment

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

I like it! Thanks so much! ❤️

@brianc brianc merged commit 46cdf9e into brianc:master Feb 3, 2026
7 checks passed
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.

3 participants