Skip site navigation (1) Skip section navigation (2)

Re: [PATCHES] insert into table (column) values (nullif('',''));

From: "John Hansen" <john(at)geeknet(dot)com(dot)au>
To: "Matt A(dot)" <survivedsushi(at)yahoo(dot)com>, <pgsql-bugs(at)postgresql(dot)org>,<pgsql-patches(at)postgresql(dot)org>
Subject: Re: [PATCHES] insert into table (column) values (nullif('',''));
Date: 2005-08-27 05:32:28
Message-ID: 5066E5A966339E42AA04BA10BA706AE50A9392@rodrick.geeknet.com.au (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-patches
Since column is boolean, you need a boolean result:

 insert into table (column) values (nullif(true,true));

> -----Original Message-----
> From: pgsql-patches-owner(at)postgresql(dot)org 
> [mailto:pgsql-patches-owner(at)postgresql(dot)org] On Behalf Of Matt A.
> Sent: Monday, August 22, 2005 3:22 AM
> To: pgsql-bugs(at)postgresql(dot)org; pgsql-patches(at)postgresql(dot)org
> Subject: [PATCHES] insert into table (column) values (nullif('',''));
> 
> 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.
> 
> Is there different function to accomplish a insert
> nullif('','') test. 
> 
> Thanks
> Matt
> 
> 
> 
> 
> 		
> ____________________________________________________
> Start your day with Yahoo! - make it your home page 
> http://www.yahoo.com/r/hs 
>  
> 
> ---------------------------(end of 
> broadcast)---------------------------
> TIP 4: Have you searched our list archives?
> 
>                http://archives.postgresql.org
> 
> 

pgsql-bugs by date

Next:From: fischerDate: 2005-08-28 02:52:43
Subject: BUG #1852: compilation failed
Previous:From: Steve WormleyDate: 2005-08-26 23:59:13
Subject: Re: BUG #1851: Performance reduction from 8.0.3

pgsql-patches by date

Next:From: Halley Pacheco de OliveiraDate: 2005-08-27 12:37:31
Subject: PostgreSQL 8.0.3 Documentation - Chapter 30. The Information Schema
Previous:From: Andrew DunstanDate: 2005-08-26 22:31:11
Subject: Re: [HACKERS] Proposed patch to getaddrinfo.c to support

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group