Re: where clause bug

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: kyle <reddwarf91(at)yahoo(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: where clause bug
Date: 2001-06-11 15:05:15
Message-ID: Pine.BSF.4.21.0106110800500.47763-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


On Fri, 8 Jun 2001, kyle wrote:

> When specifying criteria in a where claue such as
> user_id = 'value' if a non-numeric is entered the
> query returns back all rows.
> user_id = user_id brings back every user_id instead of
> error because user_id is a numeric field and it
> shouldnt be able to accept chars.

What version are you running?

Can you give a test case of the first case (user_id='value' for
non-numeric value) with schema and sample data? When
I try something like that on current sources I get
"Bad numeric input format 'value'" for a numeric column.

The second looks okay (user_id=user_id) since the
value of the user_id column is going to be equal to itself
for any non NULL value in user_id. I don't know why you'd
expect that one to error.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message meeta bhate 2001-06-11 16:07:46 Re: Information regarding foriegn key constraint.
Previous Message Michael Caine 2001-06-11 15:03:17 Re(2): Re(2): REFERENCES fails on derived classes