reference postgresjs date param binding bug 20260715T205316

Found while building Task 16's updateVoiceProfileStats targeted jsonb_set UPDATE in CreatorTrack's Scripts app: drizzle's typed .set() query builder accepts a bare JS Date object fine, but dropping to postgres.js raw SQL (sql\...`) for a targeted column update rejects a bareDatewithERR_INVALID_ARG_TYPE. Fix: pass the timestamp as an ISO string with an explicit::timestamptzcast in the query text, e.g.${date.toISOString()}::timestamptz`.

Why: worth remembering because it's a silent trap that only appears when moving from drizzle's builder to raw SQL for a targeted/partial update (a pattern likely to recur any time a full-column read-modify-write gets replaced with a race-safe targeted update).

How to apply: any time CreatorTrack code drops from drizzle's .set() builder to a raw sql\...`` template for timestamp columns, stringify the Date and cast the type explicitly rather than passing the Date object directly.

[auto-memory session 60d132de-4659-485c-8044-427af0ccce7f, confidence 0.70, mode staged]