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

From Bruno Wolff III
Subject Re: Error when comparing an integer to an empty string.
Date
Msg-id 20021121170755.GA4228@wolff.to
Whole thread Raw
In response to Error when comparing an integer to an empty string.  (David Pradier <dpradier@apartia.fr>)
Responses Re: Error when comparing an integer to an empty string.  (Louis-David Mitterrand <vindex@apartia.org>)
Re: Error when comparing an integer to an empty string.  (David Pradier <dpradier@apartia.fr>)
List pgsql-hackers
On Thu, Nov 21, 2002 at 17:30:10 +0100, David Pradier <dpradier@apartia.fr> wrote:
> Hi!
> 
> I'm new on this list, my name is David Pradier, and i'm french.
> 
> I'm currently trying the new postgresql 7.3rc1, and i've noticed that if
> 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.


pgsql-hackers by date:

Previous
From: David Pradier
Date:
Subject: Error when comparing an integer to an empty string.
Next
From: Louis-David Mitterrand
Date:
Subject: Re: Error when comparing an integer to an empty string.