Skip to content

Conversation

@arp242
Copy link
Collaborator

@arp242 arp242 commented Jan 18, 2026

Previously it would panic if a ReadyForQuery was sent without a CommandComplete or EmptyQueryResponse.

Not sure when/how this happens because as I understand the protocol technically this Shouldn't Happen™. I had a bit of a look at how libpq handles this, and it doesn't require this either: it just handles any response (if any) And prepares for a new query. So probably okay to do the same here.

Also add pqtest.Fake() to more easily test this sort of thing.

Closes #1230
Fixes #1059
Fixes #1173

Previously it would panic if a ReadyForQuery was sent without a
CommandComplete or EmptyQueryResponse.

Not sure when/how this happens because as I understand the protocol
technically this Shouldn't Happen™. I had a bit of a look at how libpq
handles this, and it doesn't require this either: it just handles any
response (if any) And prepares for a new query. So probably okay to do
the same here.

Also add pqtest.Fake() to more easily test this sort of thing.

Closes #1230
Fixes #1059
Fixes #1173

Co-authored-by: yowgf <alexthomasmol@gmail.com>
@arp242 arp242 merged commit 13013db into master Jan 18, 2026
12 checks passed
@arp242 arp242 deleted the sq branch January 18, 2026 19:30
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.

possible nil dereference in (*conn).QueryContext conn.Ping() throwing nil pointer errors

2 participants