Skip to content

PYR1-1556 Fix call-sql bigint arg overflow - #154

Merged
lambdatronic merged 1 commit into
mainfrom
sif/call-sql-bigint-fix
Jun 30, 2026
Merged

PYR1-1556 Fix call-sql bigint arg overflow#154
lambdatronic merged 1 commit into
mainfrom
sif/call-sql-bigint-fix

Conversation

@sifbiri

@sifbiri sifbiri commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

Purpose

call-sql narrowed every integer argument to a 32-bit int before binding it, so a value
past about 2.1 billion (an epoch-millisecond timestamp, for example) threw an integer-overflow
error before it ever reached Postgres, even when the target column was a bigint.

It now narrows an integer only when it fits in 32 bits and leaves larger values as 64-bit longs,
which bind to bigint parameters correctly. In-range values are untouched, so existing callers
behave exactly as before. The same guard covers the double-to-float narrowing, which had the
matching overflow on very large doubles.

Adds unit tests for the coercion and for the call-sql wiring.

@lambdatronic
lambdatronic merged commit 206bcab into main Jun 30, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants