Call out []byte in QueryExecModeSimpleProtocol documentation

https://github.com/jackc/pgx/issues/2231
pull/2257/head
Jack Christensen 2025-01-25 07:15:02 -06:00
parent 0bc29e3000
commit 5f33ee5f07
1 changed files with 6 additions and 5 deletions

11
conn.go
View File

@ -653,11 +653,12 @@ const (
// should implement pgtype.Int64Valuer. // should implement pgtype.Int64Valuer.
QueryExecModeExec QueryExecModeExec
// Use the simple protocol. Assume the PostgreSQL query parameter types based on the Go type of the arguments. Queries // Use the simple protocol. Assume the PostgreSQL query parameter types based on the Go type of the arguments. This is
// are executed in a single round trip. Type mappings can be registered with pgtype.Map.RegisterDefaultPgType. Queries // especially significant for []byte values. []byte values are encoded as PostgreSQL bytea. string must be used
// will be rejected that have arguments that are unregistered or ambiguous. e.g. A map[string]string may have the // instead for text type values including json and jsonb. Type mappings can be registered with
// PostgreSQL type json or hstore. Modes that know the PostgreSQL type can use a map[string]string directly as an // pgtype.Map.RegisterDefaultPgType. Queries will be rejected that have arguments that are unregistered or ambiguous.
// argument. This mode cannot. // e.g. A map[string]string may have the PostgreSQL type json or hstore. Modes that know the PostgreSQL type can use a
// map[string]string directly as an argument. This mode cannot. Queries are executed in a single round trip.
// //
// QueryExecModeSimpleProtocol should have the user application visible behavior as QueryExecModeExec. This includes // QueryExecModeSimpleProtocol should have the user application visible behavior as QueryExecModeExec. This includes
// the warning regarding differences in text format and binary format encoding with user defined types. There may be // the warning regarding differences in text format and binary format encoding with user defined types. There may be