Postgres accepts 'tru' and 'fals' for boolean values
github.com
github.com
select 'tru' or 'fals';
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.https://github.com/postgres/postgres/blob/master/src/backend...
which uses
https://github.com/postgres/postgres/blob/master/src/backend...