diff --git a/messages.go b/messages.go index 8e00f65f..5324cbb5 100644 --- a/messages.go +++ b/messages.go @@ -3,16 +3,9 @@ package pgx import ( "database/sql/driver" - "github.com/jackc/pgio" "github.com/jackc/pgtype" ) -const ( - copyData = 'd' - copyFail = 'f' - copyDone = 'c' -) - func convertDriverValuers(args []interface{}) ([]interface{}, error) { for i, arg := range args { switch arg := arg.(type) { @@ -28,15 +21,3 @@ func convertDriverValuers(args []interface{}) ([]interface{}, error) { } return args, nil } - -// appendQuery appends a PostgreSQL wire protocol query message to buf and returns it. -func appendQuery(buf []byte, query string) []byte { - buf = append(buf, 'Q') - sp := len(buf) - buf = pgio.AppendInt32(buf, -1) - buf = append(buf, query...) - buf = append(buf, 0) - pgio.SetInt32(buf[sp:], int32(len(buf[sp:]))) - - return buf -}