Closed laskoviymishka closed 1 year ago
This confused me at first because TestLsegTranscode
tests encoding and decoding the binary and text formats.
It appears what is happening is the [
and ]
are optional to PostgreSQL, but it always normalizes the output to include them.
jack@[local]:5432 pgx_test=# select '(1,2),(2,3)'::lseg;
lseg
───────────────
[(1,2),(2,3)]
(1 row)
I've made your suggested change in pgtype and pgx v5.
Not sure is that a proper way to handle those types:
Maybe it worth to add into lseg.EncodeText extra columns (wrap with
[
and]
)