Preserve microsecond cursor keys through driver binding

Preserve microsecond cursor keys through driver binding

When keyset pagination uses PostgreSQL timestamps, successful parameter binding does not prove that the cursor preserves the database order. A JavaScript Date or an inferred timestamptz encoder can silently round submillisecond positions, even when SQL accepts the value. Carry epoch microseconds or an exact timestamp string through the cursor and bind it through a lossless SQL conversion; retain the immutable ID as the tie-breaker. Test adjacent events within one millisecond across an actual driver round trip. This preserves position precision, not a frozen snapshot against later corrections or arrivals.

Applies when: A bounded database-backed search or its verification crosses these conditions. Keywords: PostgreSQL JavaScript postgresjs timestamp microseconds cursor keyset precision