Boolean coercion in Postgres protocol

Hi, I'm completely inexperienced with the Postgres protocol and have some coercion troubles.
I try to call - using tokio_postgres -

conn.prepare_typed("SELECT, 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.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.