Terry Carlin ([EMAIL PROTECTED]) reports a bug with a severity of 3
The lower the number the more severe it is.

Short Description
position('' in '') returns 1 instead of 0

Long Description
While running an ODBC test suite against PostgreSQL 7.1, the test software reported 
that the ODBC command locate("", "") failed.
It expected the result to be zero and it got a 1.  When I looked at what was being 
sent over to postgresql, it boiled down to a position('' in '')  Entering the command 
select position(''' in '') into psql gives a 1 also. 
if you also do select position('' in 'abc') it also returns 1.
This returns a 1.  Since the length('') returns 0, it seems to me that position('' in 
'') should return either a zero or NULL as there is no position 1 in the string ''.

Sample Code
select position('' in '');

select length('');

select position('' in 'abc');

No file was uploaded with this report


---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Reply via email to