Coder Social home page Coder Social logo

Comments (6)

fdr avatar fdr commented on June 14, 2024

Some of these problems can be consequences of design choices in database/sql:

http://golang.org/src/pkg/database/sql/sql.go#L176

The fact that you are using db.Query twice in a row before closing the two row sets at the end is probably causing something weird.

Can you submit a test case for the version that blocks? That feels like a definite bug.

from pq.

bgentry avatar bgentry commented on June 14, 2024

The fact that you are using db.Query twice in a row before closing the two row sets at the end is probably causing something weird.

That should just result in a new connection being allocated for the connection pool. It shouldn't cause any conflicts.

from pq.

fdr avatar fdr commented on June 14, 2024

That should just result in a new connection being allocated for the connection pool. It shouldn't cause any conflicts.

That's my thinking, too. Hence, the request for this variant of the test.

from pq.

kisielk avatar kisielk commented on June 14, 2024

Okay, so if I understand correctly, the reason I'm getting the "relation temp2 does not exist" error is because the sql package starts up a new connection which now doesn't haver this temp2 table. That makes sense.

Unfortunately I don't have the test case with the transaction handy right now since I just fixed the code and moved on (it was a fair bit more complicated than the provided example, so I was trying to simplify), but I will make an attempt to reproduce it this weekend and get back to you. Thanks guys.

from pq.

kisielk avatar kisielk commented on June 14, 2024

I just found this in the Go bug tracker today: https://code.google.com/p/go/issues/detail?id=3857

Sounds like what I was experiencing, so it looks like it's more like a bug in database/sql than specific to this driver.

from pq.

fdr avatar fdr commented on June 14, 2024

Thanks for investigating. Yes, I believe you are right. Unfortunate. Re-open if you think this bug has more to it on the pq side.

from pq.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.