коммит произвёл
GitHub
родитель
a3cf490a4d
Коммит
03a55367d9
13
vendor/github.com/lib/pq/conn.go
сгенерированный
поставляемый
13
vendor/github.com/lib/pq/conn.go
сгенерированный
поставляемый
@@ -149,6 +149,9 @@ type conn struct {
|
||||
|
||||
// If true this connection is in the middle of a COPY
|
||||
inCopy bool
|
||||
|
||||
// If not nil, notices will be synchronously sent here
|
||||
noticeHandler func(*Error)
|
||||
}
|
||||
|
||||
// Handle driver-side settings in parsed connection string.
|
||||
@@ -971,7 +974,9 @@ func (cn *conn) recv() (t byte, r *readBuf) {
|
||||
case 'E':
|
||||
panic(parseError(r))
|
||||
case 'N':
|
||||
// ignore
|
||||
if n := cn.noticeHandler; n != nil {
|
||||
n(parseError(r))
|
||||
}
|
||||
default:
|
||||
return
|
||||
}
|
||||
@@ -988,8 +993,12 @@ func (cn *conn) recv1Buf(r *readBuf) byte {
|
||||
}
|
||||
|
||||
switch t {
|
||||
case 'A', 'N':
|
||||
case 'A':
|
||||
// ignore
|
||||
case 'N':
|
||||
if n := cn.noticeHandler; n != nil {
|
||||
n(parseError(r))
|
||||
}
|
||||
case 'S':
|
||||
cn.processParameterStatus(r)
|
||||
default:
|
||||
|
||||
Ссылка в новой задаче
Block a user