Пример #1
0
// Reset closes the connection to the server and attempts to re-establish a new
// connection using the parameters passed in the original Connect call.
func (c *Conn) Reset() os.Error {
	if c == nil || c.db == nil {
		return os.NewError("nil postgresql connection")
	}
	C.PQreset(c.db)
	if C.PQstatus(c.db) != C.CONNECTION_OK {
		return connError(c.db)
	}
	return nil
}
Пример #2
0
func LoadHbPostgresqlC() {
	var conn *C.PGconn
	C.PQreset(conn)
}