Hey. I used your suggestion and it worked like a
charm! The...
CREATE FUNCTION nullif_bool(text) RETURNS boolean AS '
BEGIN
RETURN nullif($1, );
END;
' LANGUAGE plpgsql IMMUTABLE STRICT;
THANK YOU!
--- Michael Fuhr <[EMAIL PROTECTED]> wrote:
> On Fri, Aug 26, 2005 at 12:22:27PM -07
We use NULLIF() for adding [1|0|null] according to the
evalution of nullif('x','') into boolean columns.
Where x is [1|0|null], which if it's an empty string
(x='') then we add NULL cause NULLIF says if '' == ''
then return NULL into boolean.
An example wrapper function for this with an integer
On Fri, Aug 26, 2005 at 12:22:27PM -0700, Matt A. wrote:
> How do I get this to work?
>
> create function nullif_bool(boolean) returns
> bool as ' select nullif(''$1'',)::bool;' language
> sql;
If an empty string is a possible input then the argument type can't
be boolean because you'll get a
How do I get this to work?
create function nullif_bool(boolean) returns
bool as ' select nullif(''$1'',)::bool;' language
sql;
???
Thank you.
Start your day with Yahoo! - make it your home page
http://www.yahoo.com/r/