mirror of
https://github.com/jackc/pgx.git
synced 2025-05-31 11:42:24 +00:00
Encode text for Lseg includes [ and ]
https://github.com/jackc/pgtype/issues/187
This commit is contained in:
parent
72e4b88e56
commit
ac9d4f4d96
@ -117,7 +117,7 @@ func (encodePlanLsegCodecText) Encode(value any, buf []byte) (newBuf []byte, err
|
|||||||
return nil, nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
buf = append(buf, fmt.Sprintf(`(%s,%s),(%s,%s)`,
|
buf = append(buf, fmt.Sprintf(`[(%s,%s),(%s,%s)]`,
|
||||||
strconv.FormatFloat(lseg.P[0].X, 'f', -1, 64),
|
strconv.FormatFloat(lseg.P[0].X, 'f', -1, 64),
|
||||||
strconv.FormatFloat(lseg.P[0].Y, 'f', -1, 64),
|
strconv.FormatFloat(lseg.P[0].Y, 'f', -1, 64),
|
||||||
strconv.FormatFloat(lseg.P[1].X, 'f', -1, 64),
|
strconv.FormatFloat(lseg.P[1].X, 'f', -1, 64),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user