On Sun, 21 Aug 2005, Matt wrote:

>
> The following bug has been logged online:
>
> Bug reference:      1839
> Logged by:          Matt
> Email address:      [EMAIL PROTECTED]
> PostgreSQL version: 8.0.3
> Operating system:   linux
> Description:        insert into table (column) values (nullif('',''));
> Details:
>
> insert into table (column) values (nullif('',''));
> ERROR: column "column" is of type boolean but
> expression is of type text.
>
> inserting NULL works. nullif('','') should return NULL
> if both values are equal? It works in MSSQL.

It does return a NULL AFAICS, however it looks like it returns a NULL cast
to a textual type (since if they were different, it would return its first
argument according to the docs).

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

Reply via email to