Re: BUG #1839: insert into table (column) values (nullif('','')); - Mailing list pgsql-bugs

From Stephan Szabo
Subject Re: BUG #1839: insert into table (column) values (nullif('',''));
Date
Msg-id 20050822071618.L87514@megazone.bigpanda.com
Whole thread Raw
In response to BUG #1839: insert into table (column) values (nullif('',''));  ("Matt" <survivedsushi@yahoo.com>)
List pgsql-bugs
On Sun, 21 Aug 2005, Matt wrote:

>
> The following bug has been logged online:
>
> Bug reference:      1839
> Logged by:          Matt
> Email address:      survivedsushi@yahoo.com
> 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).

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #1838: IndexSupportInitialze
Next
From: Michael Fuhr
Date:
Subject: Re: BUG #1839: insert into table (column) values (nullif('',''));