Re: where clause bug - Mailing list pgsql-bugs

From Stephan Szabo
Subject Re: where clause bug
Date
Msg-id Pine.BSF.4.21.0106110800500.47763-100000@megazone23.bigpanda.com
Whole thread Raw
In response to where clause bug  (kyle <reddwarf91@yahoo.com>)
List 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.

pgsql-bugs by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: Re(2): REFERENCES fails on derived classes
Next
From: Stephan Szabo
Date:
Subject: Re: Information regarding foriegn key constraint.