Skip to content

Conversation

@zfarrell
Copy link
Contributor

Summary

Fixes #63. Casts PostgreSQL NUMERIC/DECIMAL columns to TEXT in fetch queries so sqlx can decode them without the bigdecimal feature.

Test plan

  • Added test_postgres_fetch_numeric_not_null_columns - verifies NOT NULL NUMERIC columns work
  • Added test_postgres_fetch_numeric_nullable_columns - verifies nullable NUMERIC columns with NULL values work
  • All existing tests pass

Fixes #63. PostgreSQL NUMERIC/DECIMAL columns could not be decoded by
sqlx without the bigdecimal feature. The previous .try_get().ok()
pattern silently converted decode errors to null, causing Arrow to
throw "Column is declared as non-nullable but contains null values".

- Build explicit column list instead of SELECT *
- Cast NUMERIC/DECIMAL columns to TEXT in query
- Add try_get_with_warning helper for decode error logging
- Add regression tests for NOT NULL and nullable NUMERIC columns
@zfarrell zfarrell merged commit 53373b3 into main Jan 20, 2026
6 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.

Invalid argument error: Column 'c_acctbal' is declared as non-nullable but contains null values

2 participants