I was a bit confused by this claim initially, but I think the point is that Postgres will evaluate e.g. the following expression to TRUE:<p><pre><code> select 'tru' or 'fals';
</code></pre>
If you change the strings to e.g. 'bar' and 'baz', then you'll see the expected kind of error. Postgres will parse any non-zero prefix of 'true' or 'false' as a boolean in a boolean conversion context.
The linked code is actually just for the variables in psql (the commandline tool). For the code parsing input to the SQL-level bool datatype, it's<p><a href="https://github.com/postgres/postgres/blob/master/src/backend/utils/adt/bool.c#L126">https://github.com/postgres/postgres/blob/master/src/backend...</a><p>which uses<p><a href="https://github.com/postgres/postgres/blob/master/src/backend/utils/adt/bool.c#L36">https://github.com/postgres/postgres/blob/master/src/backend...</a>