Skip to content

Fix TIMESTAMP(10..12) fetch performance issue(#1079) and drop Python 3.9/3.10 wheel builds - #1080

Merged
bimalkjha merged 2 commits into
ibmdb:masterfrom
Earammak:tsissue_1079
Oct 20, 2026
Merged

bimalkjha merged 2 commits into
ibmdb:masterfrom
Earammak:tsissue_1079

Conversation

@Earammak

Copy link
Copy Markdown
Collaborator

Summary

Fix for #1079.
Fetching TIMESTAMP columns with fractional precision greater than 9 (TIMESTAMP(10..12)) raised a CLI0182W (SQLSTATE 01S07) truncation warning for every fetched row. The resulting diagnostic handling introduced significant fetch overhead.

This PR updates timestamp binding to use extended timestamp structures for high-precision timestamps and removes Python 3.9 and 3.10 support.

Changes

  • ibm_db.c: bind TIMESTAMP columns with scale > 9 using SQL_C_TIMESTAMP_EXT
    (TIMESTAMP_STRUCT_EXT) instead of TIMESTAMP_STRUCT. This covers
    single-row fetch (SQLBindCol), rowset fetch, and the cleanup paths.

  • Python values are unchanged: datetime.datetime with microsecond precision.

  • ibm_db.c (ibm_db_fetch_callproc): the debug log messages for array and
    scalar TIMESTAMP output parameters now show whether the type is TIMESTAMP or
    TIMESTAMP WITH TIME ZONE. The two types share a case branch and were both
    logged as TIMESTAMP.

  • .github/workflows/bld_wheels_and_upload.yml: skip cp39/cp310/pp39/pp310 in
    all cibuildwheel jobs (Windows, Linux, macOS), so 3.9 and 3.10 wheels are no
    longer built.

  • setup.py: remove the 3.9/3.10 classifiers.

  • README: Update supported Python version range and add timestamp precision notes.

  • Tests: add test_6794 and async test_37 for timestamp precision fetch.

@bimalkjha
bimalkjha merged commit e3831c4 into ibmdb:master Oct 20, 2026
8 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.

Fetching TIMESTAMP(10..12) columns is ~10x slower: per-row CLI0182W (01S07) diagnostic handling

2 participants