4 comments

[ 3.6 ms ] story [ 18.8 ms ] thread
> Valid values are: true, false, yes, no, on, off, 1, 0; as well as unique prefixes thereof.
oh neat, so t, f, y, n, on, of, 1, 0
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:

    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.