Comments (6)
your postgresql listen on 5432? or check your database'name
from pq.
My bad, I just needed to create the db.
ijt@web:$ sudo -u postgres createdb pqgotest$ PGHOST=/var/run/postgresql go test github.com/bmizerany/pq
ijt@web:
ok github.com/bmizerany/pq 0.838s
from pq.
What do your Postgres logs say?
On Apr 23, 2012, at 1:57 AM, Issac [email protected] wrote:
ijt@web:~$ PGHOST=/var/run/postgresql go test github.com/bmizerany/pq
--- FAIL: TestExec (0.06 seconds)
conn_test.go:39: driver: bad connection
--- FAIL: TestStatment (0.06 seconds)
conn_test.go:67: driver: bad connection
--- FAIL: TestRowsCloseBeforeDone (0.06 seconds)
conn_test.go:126: driver: bad connection
--- FAIL: TestEncodeDecode (0.06 seconds)
conn_test.go:168: driver: bad connection
--- FAIL: TestNoData (0.07 seconds)
conn_test.go:225: driver: bad connection
--- FAIL: TestErrorOnExec (0.06 seconds)
conn_test.go:294: expected PGError, was: &errors.errorString{s:"driver: bad connection"}
--- FAIL: TestErrorOnQuery (0.06 seconds)
conn_test.go:310: driver: bad connection
--- FAIL: TestBindError (0.06 seconds)
conn_test.go:339: driver: bad connection
--- FAIL: TestNullAfterNonNull (0.06 seconds)
conn_test.go:380: driver: bad connection
FAIL
FAIL github.com/bmizerany/pq 0.616sAm I running this incorrectly?
Reply to this email directly or view it on GitHub:
https://github.com/bmizerany/pq/issues/19
from pq.
@bmizerany Thank you for suggesting that. I am still having trouble connecting from my program, so I'll see if the log helps me track it down.
from pq.
The problem was that I had not yet set a password. I set a password and set the PGPASSWORD environment variable to it, and now it connects.
from pq.
Awesome.
On Mon, Apr 23, 2012 at 10:05 PM, Issac Trotts
[email protected]
wrote:
The problem was that I had not yet set a password. I set a password and set the PGPASSWORD environment variable to it, and now it connects.
Reply to this email directly or view it on GitHub:
https://github.com/bmizerany/pq/issues/19#issuecomment-5297631
from pq.
Related Issues (20)
- 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.
- Usage of COPY TO STDOUT WITH CSV
- RFC 9266: Channel Bindings for TLS 1.3 support
- Query extra_float_digits problem
- Is Postgres15.4 is compatible with the lib/pq package?
- What kind of mistake is this?
- how to deal with "cached plan must not change result type" error?
- Looking for a security contact to disclose a vulnerability HOT 1
- Exectuing pq.CopyIn fails with one of two errors depending on usage
- Why do I have errors in local language?
- pq: invalid array literal.
- pq: invalid input syntax for type integer HOT 2
- Private keys cause Trivy HIGH vulnerability alerts HOT 4
- Nil byte array doesn't get saved as JSONB field
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.