Hi, I'm completely inexperienced with the Postgres protocol and have some coercion troubles.
I try to call - using
conn.prepare_typed("SELECT t.id, t.completed FROM Todo t \ WHERE t.completed = $1", &[Type::VARCHAR]).await?; // Fails at runtime
This does not work, because the column
t.completed has a boolean type and I try to give a string.
However according to Postgres documentation strings, such as 'yes' are allowed for boolean columns.
In the Postgres source code there is actually a coercing function. However it doesn't work out with the statement above.
Has anyone been successful providing a string for a boolean column?
Thanks for your time.