Re: where clause bug
Stephan Szabo <sszabo@megazone23.bigpanda.com>
From: Stephan Szabo <sszabo@megazone23.bigpanda.com>
To: kyle <reddwarf91@yahoo.com>
Cc: pgsql-bugs@postgresql.org
Date: 2001-06-11T15:05:15Z
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.