> Your problem is that NULL's are typed in PostgreSQL.
>
> Try this:
>
> SELECT NULL;
> SELECT NULL::BOOL;
> SELECT NULL::BOOL::TEXT;
>
> to see what I mean. This is an exact illustration of your problem.
Note that in 8.1 he will be able to do:
SELECT NULL::TEXT::INT::BOOL
and get the conversi
Matt L. wrote:
I need to test whether or not a value is null on
insert.
Example: insert into table (column) values
nullif('',''));
ERROR: column "column" is of type boolean but
expression is of type text.
Your problem is that NULL's are typed in PostgreSQL.
Try this:
SELECT NULL;
SELECT
I need to test whether or not a value is null on
insert.
Example: insert into table (column) values
nullif('',''));
ERROR: column "column" is of type boolean but
expression is of type text.
It works in MSSQL (probably against not standards) but
nonetheless I need to make it work.
I assume it's