use inline_postgres as pg; use inline_postgres::prelude::*; fn main() -> Result<(), pg::Error> { let mut client = pg::Client::connect("host=localhost, user=postgres", pg::NoTls)?; let x = 10; client.exec(stmt! { select 1, generate_series(1, {x}) as number })?; Ok(()) }