Re: Error when comparing an integer to an empty string. - Mailing list pgsql-hackers

From David Pradier
Subject Re: Error when comparing an integer to an empty string.
Date
Msg-id 20021122090242.GA27817@apartia.fr
Whole thread Raw
In response to Re: Error when comparing an integer to an empty string.  (Bruno Wolff III <bruno@wolff.to>)
List pgsql-hackers
> > i compared an integer to an empty string, i ran in an error.
> > Is this a bug or a feature of the new 7.3 version ?
> > Is there a purpose ?
> 
> What number do you expect '' to represent?
> Probably you either want to use:
> = '0'
> or
> is null
> depending on what you are really trying to do.

It's because it comes from a perl building of the request.
Typically : '$youpee'
When $youpee is undef, it's no problem in 7.2, and the request returns
false.
Now it raises an error.
(Ok, i've understood it was on purpose ; i give these info only for the
background :-)

Best regards,
David

-- 
dpradier@apartia.fr


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Fw: Missing file from CVS?
Next
From: Masaru Sugawara
Date:
Subject: connectby with schema