Relational operators - Mailing list pgsql-bugs

From Pieter-Jan Savat
Subject Relational operators
Date
Msg-id 42BFD73B.8030109@barclab.com
Whole thread Raw
Responses Re: Relational operators
List pgsql-bugs
Hi,

I was wondering if the following issue is in fact a bug, or just
inconvenient behaviour...

say a table looks like this:

table
---
c (varchar)
'20'
'0'
'-10'
'klj'
'> 5'
'qwerty'
'< 6'

The query select * from table where c < 5 will return for instance the
tuple containing '20'.
In other words, postgresql 8.0 will not automatically cast the results
to a numeric value and only take into account those tuples that can be
cast (not 'klj' nor 'qwerty') ... unlike some other databases ....

Any (standard) solutions to this problem?

-greetz, pj

pgsql-bugs by date:

Previous
From: satish reddy
Date:
Subject: problem with unexpected error
Next
From: Stephan Szabo
Date:
Subject: Re: Relational operators