Closed rpstw closed 5 months ago
🤷
The Int2
, Int4
, and Int8
code is generated from the same template. The bounds checking is unnecessary in the Int8
case but it is necessary for Int2
and Int4
.
I don't think it is worth specializing the template for Int8
to eliminate those calls.
https://github.com/jackc/pgx/blob/9907b874c223887dba628215feae29be69306e73/pgtype/int.go#L1188 https://github.com/jackc/pgx/blob/9907b874c223887dba628215feae29be69306e73/pgtype/int.go#L1209-L1213 An
int64
can never be less thanmath.MinInt64
or more thanmath.MaxInt64
, maybe we should delete these code.