From: Matt A. <survivedsushi@yahoo.com>
To: pgsql-general@postgresql.org
Subject: help
Date: Thu, 25 Aug 2005 13:44:52 -0700 (PDT)
Message-ID: <20050825204453.89783.qmail@web35202.mail.mud.yahoo.com> (raw)
We used nullif('$value','') on inserts in mssql. We
moved to postgres but the nullif() function doesn't
match empty strings to each other to return null.
MS SQL2000 nullif('1','') would insert 1 as integer
even though wrapped in '' (aka string). Also
nullif('','') would evaluate NULL (both equal returns
NULL) and insert the "not a value" accordingly, not
return text 'NULL' instead of return NULL if '' == ''.
Postgresql will through an error since the defined
return type is text.
I would like to alter this function all together. How
could I find it to manipulate it?
We cannot always enter a value for a integer, text,
boolean, etc column.
Is there any other way to accomplish this in any
language? C? Python? PL/x? If so can you suggest where
we could learn how to do this or provide an example?
Please help.
Domo
Matthew
____________________________________________________
Start your day with Yahoo! - make it your home page
http://www.yahoo.com/r/hs
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: survivedsushi@yahoo.com
Subject: Re: help
In-Reply-To: <20050825204453.89783.qmail@web35202.mail.mud.yahoo.com>
References: <20050825204453.89783.qmail@web35202.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