I' learning postgresql, and I typed the following commands.
CREATE TABLE t(co1 boolean, col2 text);
INSERT INTO t VALUES(NULL, 'NULL');
SELECT * FROM t where col2::boolean;
And the result came out like this:
ERROR: invalid input syntax for type boolean: "NULL".
Why is that happened since things like 'True'::boolean is correct?
'NULL'is not the null value, it's a string...nullis neithertruenorfalse