Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pq: unexpected describe rows response: 'D' #142

Closed
dajohi opened this issue Sep 13, 2013 · 5 comments
Closed

pq: unexpected describe rows response: 'D' #142

dajohi opened this issue Sep 13, 2013 · 5 comments

Comments

@dajohi
Copy link
Contributor

dajohi commented Sep 13, 2013

Hello -

I created a prepared select statement. When I run it within a transaction, I get the follow error:

pq: unexpected describe rows response: 'D'

I believe lib/pq needs to support 'D'

libpq does it like so: http://doxygen.postgresql.org/fe-protocol3_8c_source.html#l00318

@RangelReale
Copy link

This is the same error as this:

#81

You can't run another query on the same connection without finishing the previous one. See the discussion on that thread.

@dajohi
Copy link
Contributor Author

dajohi commented Sep 13, 2013

Ahh, yes, that was it. Thanks for the pointer!

@dajohi dajohi closed this as completed Sep 13, 2013
@otiai10
Copy link

otiai10 commented Oct 14, 2014

I faced the same error message.
You helped me a lot.
Thank you very much! 👍

@rubens21
Copy link

rubens21 commented Sep 6, 2018

Just a heads-up:
I was not starting two transactions, but I was getting the same error.
In my case, the problem was a *sql.Row that I was not closing.

returnedRow, err := myTransaction.Query(...)

fix:

returnedRow, err := myTransaction.Query(...)
// do you job
returnedRow.Close()

@aashishAil
Copy link

I was running to goroutines to update a different table with the same transaction, which was introducing a race condition that sometimes the 1st update query had not finished when the 2nd query started and giving me the error.
Fix: Make the go routines trigger after completion

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

No branches or pull requests

5 participants