Comments (6)
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.
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.
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.
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.
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.
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)
- `postgres_sql_instance` can't get referenced even after I put it into a struct
- how to select a table when i don't know its structure?I just want rows of data.That means I need 'rows.lastcols'
- Not possible to scan into `pq.Array(&[]pq.NullTime)` in `lib/[email protected]`
- panic: panic: attempt to set nil err
- Cannot use a variable of type `int64` with `NULLIF` HOT 2
- db.Close() fails when a query operation (ExecContext) is cancelled HOT 1
- ▄
- lib/pq incorrectly escapes input strings that are already escaped
- v1.10.8 break if .pgpass contains empty line HOT 1
- v1.10.8 got undefined: driver.Validator HOT 2
- Potential leak in notify.go HOT 1
- Unable to parse arrays that are not 1-based
- Array types can't convert {NULL} HOT 2
- Does pg not support integer type?
- converting NULL to string is unsupported
- [docs] Add example of multiple parallel listeners HOT 1
- Tx.Rollback returns ErrBadConn after context is cancelled
- Connection string parsing fails randomly HOT 2
- 1 Listener for 2 channel HOT 1
- SonarCloud Vulnerability: Make sure this PostgreSQL database password gets changed and removed from the code.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pq.