File tree 1 file changed +6
-5
lines changed
1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -653,11 +653,12 @@ const (
653
653
// should implement pgtype.Int64Valuer.
654
654
QueryExecModeExec
655
655
656
- // Use the simple protocol. Assume the PostgreSQL query parameter types based on the Go type of the arguments. Queries
657
- // are executed in a single round trip. Type mappings can be registered with pgtype.Map.RegisterDefaultPgType. Queries
658
- // will be rejected that have arguments that are unregistered or ambiguous. e.g. A map[string]string may have the
659
- // PostgreSQL type json or hstore. Modes that know the PostgreSQL type can use a map[string]string directly as an
660
- // argument. This mode cannot.
656
+ // Use the simple protocol. Assume the PostgreSQL query parameter types based on the Go type of the arguments. This is
657
+ // especially significant for []byte values. []byte values are encoded as PostgreSQL bytea. string must be used
658
+ // instead for text type values including json and jsonb. Type mappings can be registered with
659
+ // pgtype.Map.RegisterDefaultPgType. Queries will be rejected that have arguments that are unregistered or ambiguous.
660
+ // e.g. A map[string]string may have the PostgreSQL type json or hstore. Modes that know the PostgreSQL type can use a
661
+ // map[string]string directly as an argument. This mode cannot. Queries are executed in a single round trip.
661
662
//
662
663
// QueryExecModeSimpleProtocol should have the user application visible behavior as QueryExecModeExec. This includes
663
664
// the warning regarding differences in text format and binary format encoding with user defined types. There may be
You can’t perform that action at this time.
0 commit comments