Documentation ¶
Overview ¶
Package pq is a pure Go Postgres driver for the database/sql package.
Index ¶
Constants ¶
View Source
const ( Efatal = "FATAL" Epanic = "PANIC" Ewarning = "WARNING" Enotice = "NOTICE" Edebug = "DEBUG" Einfo = "INFO" Elog = "LOG" )
Variables ¶
View Source
var ( ErrSSLNotSupported = errors.New("pq: SSL is not enabled on the server") ErrNotSupported = errors.New("pq: invalid command") )
Functions ¶
func ParseURL ¶
ParseURL converts url to a connection string for driver.Open. Example:
"postgres://bob:secret@1.2.3.4:5432/mydb?sslmode=verify-full"
converts to:
"user=bob password=secret host=1.2.3.4 port=5432 dbname=mydb sslmode=verify-full"
A minimal example:
"postgres://"
This will be blank, causing driver.Open to use all of the defaults
Types ¶
type SimplePGError ¶
type SimplePGError struct {
// contains filtered or unexported fields
}
func (*SimplePGError) Error ¶
func (err *SimplePGError) Error() string
Click to show internal directories.
Click to hide internal directories.