pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Matt L. <survivedsushi@yahoo.com>
To: pgsql-sql@postgresql.org
Subject: nullif('','') on insert
Date: Sat, 20 Aug 2005 18:40:23 -0700 (PDT)
Message-ID: <20050821014023.92296.qmail@web35209.mail.mud.yahoo.com> (raw)

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 returning 'NULL' w/ quotes? I don't know
where to look to alter it. I looked into functions but
all I see is how to write "AS queries" or point to
various snippets. I'd rather just alter the nullif
function. 

Is there a function for this or could someone give me
an example to insert NULL? 

Cheers
Matt


		
__________________________________ 
Yahoo! Mail for Mobile 
Take Yahoo! Mail with you! Check email on your mobile phone. 
http://mobile.yahoo.com/learn/mail 



view thread (3+ messages)  latest in thread

Message-ID: <20050821014023.92296.qmail@web35209.mail.mud.yahoo.com>
Permalink:  ../20050821014023.92296.qmail@web35209.mail.mud.yahoo.com/
Also on:    postgresql.org/message-id/20050821014023.92296.qmail@web35209.mail.mud.yahoo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: survivedsushi@yahoo.com
  Subject: Re: nullif('','') on insert
  In-Reply-To: <20050821014023.92296.qmail@web35209.mail.mud.yahoo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox