POSTGRES_PLACEHOLDERS

Constant POSTGRES_PLACEHOLDERS 

Source
pub const POSTGRES_PLACEHOLDERS: &[&str];
Expand description

Pre-computed PostgreSQL placeholder strings for indices 1-256. This avoids format! calls for the most common parameter counts. Index 0 is unused (placeholders start at $1), but kept for simpler indexing. Pre-computed PostgreSQL parameter placeholders ($1-$256).

This lookup table avoids format! calls for common parameter counts. Index 0 is “$0” (unused), indices 1-256 map to “$1” through “$256”.

§Performance

Using this table instead of format!("${}", i) improves placeholder generation by ~97% (from ~200ns to ~5ns).